Query-ing arrays

Поиск
Список
Период
Сортировка
От Jon Lapham
Тема Query-ing arrays
Дата
Msg-id 20000901122704.A19497@gandalf.bioqmed.ufrj.br
обсуждение исходный текст
Ответы Re: Query-ing arrays
Список pgsql-sql
Stupid FAQ probably:

Is it possible to query an array for an item WITHOUT KNOWING where in the
array the item might be held?

For example, I have a tbale with the following character array:
> category char(3)[],

I would like to find all records in which 'category' contains an array
element of a certain type, like maybe 'xxx' for instance.  So, for a
particular record, 'category' may be set to '{'gfe','qwe','xcs','xxx'}'

I cannot do:
SELECT * FROM blah WHERE category[4]='xxx';
because I do not know that the 'xxx' will always be in the 4th position.

Suggestions?  TIA, Jon

-- 

-**-*-*---*-*---*-*---*-----*-*-----*---*-*---*-----*-----*-*-----*---Jon LaphamCentro Nacional de Ressonancia
MagneticaNuclear de MacromoleculasUniversidade Federal do Rio de Janeiro (UFRJ) - Brasilemail:
jlapham@gandalf.bioqmed.ufrj.br 
 
***-*--*----*-------*------------*--------------------*---------------


В списке pgsql-sql по дате отправления:

Предыдущее
От: Andreas Tille
Дата:
Сообщение: Re: RE: Create table in functions
Следующее
От: Stephan Szabo
Дата:
Сообщение: Re: Query-ing arrays