Re: Finding a value in an array field
От | Roberto (SmartBit) |
---|---|
Тема | Re: Finding a value in an array field |
Дата | |
Msg-id | 001401c276ad$3f681240$1501a8c0@NoteBook обсуждение исходный текст |
Ответ на | Finding a value in an array field ("Roberto (SmartBit)" <[email protected]>) |
Список | pgsql-general |
thanks Jeff this is my SQL command: select pg_attribute.attname from pg_index, pg_attribute, pg_class where indrelid=pg_class.oid and (indrelid=pg_attribute.attrelid and pg_attribute.attnum IN indkey) and pg_class='mytablename' and idxisprimary I'm trying to return fields of MyTable's primary key!! the field 'indkey' is an array!! if thera are other ways... please, tell me how.. tia ----- Original Message ----- From: "Jeff Davis" <[email protected]> To: <[email protected]> Sent: Thursday, October 17, 2002 9:08 PM Subject: Re: [GENERAL] Finding a value in an array field I think you need to look at the functions in /contrib. I don't think you can do it just in SQL. Regards, Jeff Davis On Thursday 17 October 2002 05:45 pm, Roberto (SmartBit) wrote: > How can I know if a value is into an array field? > > something like: > > SELECT field1, field2 FROM myTableName > WHERE 10 in myArrayField > > PS: I do NOT know then number of array elements! > > tia > > Roberto de Amorim - +55 48 346-2243 > Software engineer at SmartBit Software > Delphi and Interbase consultant > > ---------------------------(end of broadcast)--------------------------- > TIP 3: if posting/reading through Usenet, please send an appropriate > subscribe-nomail command to [email protected] so that your > message can get through to the mailing list cleanly ---------------------------(end of broadcast)--------------------------- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [email protected])
В списке pgsql-general по дате отправления: