From: Tom Lane <tgl@sss.pgh.pa.us>
To: Greg Wickham <greg@geelong.com>
Cc: pgsql-sql@hub.org
Subject: Re: Query about using arrays (for accessing pg_group)
Date: Sun, 02 Jul 2000 12:38:47 -0400
Message-ID: <5263.962555927@sss.pgh.pa.us> (raw)
In-Reply-To: <20000702072023.3C29110E98@mail.surfcoast.net>
References: <20000702072023.3C29110E98@mail.surfcoast.net>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, greg@geelong.com, pgsql-sql@hub.org
Subject: Re: Query about using arrays (for accessing pg_group)
In-Reply-To: <5263.962555927@sss.pgh.pa.us>
References: <20000702072023.3C29110E98@mail.surfcoast.net> <5263.962555927@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox