Comparing arrays

Поиск
Список
Период
Сортировка
От A Gilmore
Тема Comparing arrays
Дата
Msg-id 4340AF09.8030101@shaw.ca
обсуждение исходный текст
Ответы Re: Comparing arrays  (Andreas Kretschmer <akretschmer@spamfence.net>)
Список pgsql-novice
Hello,

Id like to compare two arrays, and if any value is found in both, return
true.  Is this possible without needing a procedure to loop through one?

For example, say categories is an array :

SELECT * FROM t1 WHERE ANY(ARRAY[5,7,9]) = ANY(categories);

Obviously this doesn't work, but you can kinda see what Im trying to do.

Thank you for any insight,
- A Gilmore

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Vacuum analyse 8.0.3
Следующее
От: ig@freemail.gr (XXXXX XXXXXXXXXXXXXXX)
Дата:
Сообщение: 8.0.3 Installation Error On WinXP SP2