Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id AA4A44759A4 for ; Sat, 29 Jun 2002 17:11:27 -0400 (EDT) Mailbox-Line: From sszabo@megazone23.bigpanda.com Sat Jun 29 17:11:27 2002 Received: from megazone.bigpanda.com (megazone.bigpanda.com [63.150.15.178]) by postgresql.org (Postfix) with ESMTP id A6C09475967 for ; Sat, 29 Jun 2002 17:11:18 -0400 (EDT) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id 10AF1D610; Sat, 29 Jun 2002 14:11:20 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id 065C05C02; Sat, 29 Jun 2002 14:11:19 -0700 (PDT) Date: Sat, 29 Jun 2002 14:11:19 -0700 (PDT) From: Stephan Szabo To: Kelly Cc: Subject: Re: selecting from integer[] In-Reply-To: <3D1D9EA9.3090604@sni.ph> Message-ID: <20020629140955.L51866-100000@megazone23.bigpanda.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Status: No, hits=-3.5 required=5.0 tests=IN_REP_TO,X_NOT_PRESENT,NO_MX_FOR_FROM version=2.30 X-Spam-Level: X-Archive-Number: 200206/413 X-Sequence-Number: 8378 On Sat, 29 Jun 2002, Kelly wrote: > select * from pg_user where usesysid=(select grolist[1] from pg_group > where groname='mygroup'); > select * from pg_user where usesysid=(select grolist[2] from pg_group > where groname='mygroup'); > select * from pg_user where usesysid=(select grolist[3] from pg_group > where groname='mygroup'); > > Can those three queries be merged to one query? (and still gives me > those three rows) > Or do I have to explicitly say grolist[1], grolist[2], etc.... If you want to do "is element in array," I believe the array iterator functions in contrib/array might help you.