Re: Query about using arrays (for accessing pg_group)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Query about using arrays (for accessing pg_group)
Дата
Msg-id 5263.962555927@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Query about using arrays (for accessing pg_group)  (Greg Wickham <greg@geelong.com>)
Список pgsql-sql
Greg Wickham <greg@geelong.com> writes:
> If I try the half intuitive approach
> z=> select groname from pg_group where grolist = 21;
> ERROR:  Unable to identify an operator '=' for types '_int4' and 'int4'
>         You will have to retype this query using an explicit cast
> The cause of my problem is the use of an array to store the user id's
> associated with a group. Not sure how to get around this.

You need a function that will return true if any of the elements of
an int4 array is equal to a particular int4 value.  See contrib/array/
for one way to do it.
        regards, tom lane


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

Предыдущее
От: Joachim Trinkwitz
Дата:
Сообщение: Re: retrieving a serial number
Следующее
От: Joern Muehlencord
Дата:
Сообщение: case insensitive search