X-Original-To: pgsql-general-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 8A66FD1B57C for ; Thu, 26 Feb 2004 22:33:54 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 30916-02 for ; Thu, 26 Feb 2004 18:33:42 -0400 (AST) Received: from mailhub2.une.edu.au (mailhub.une.edu.au [129.180.4.202]) by svr1.postgresql.org (Postfix) with ESMTP id 19D5ED1CAF6 for ; Thu, 26 Feb 2004 18:33:39 -0400 (AST) Received: from icarus.une.edu.au (icarus.une.edu.au [129.180.47.120]) by mailhub2.une.edu.au (Postfix) with ESMTP id 96CB042; Fri, 27 Feb 2004 09:33:40 +1100 (EST) Received: from kgb (kgb.une.edu.au [129.180.47.225]) by icarus.une.edu.au (8.12.8/8.12.8) with SMTP id i1QMcoHA004614; Fri, 27 Feb 2004 09:38:51 +1100 Date: Fri, 27 Feb 2004 09:40:17 +1100 From: Klint Gore To: Alexander Cohen Cc: pgsql-general@postgresql.org Subject: Re: Help with a query In-Reply-To: <54A4211E-68A5-11D8-ADD0-000A95B947DC@toomuchspace.com> References: <54A4211E-68A5-11D8-ADD0-000A95B947DC@toomuchspace.com> Message-Id: <403E75D18D.853AKG@129.180.47.120> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Mailer: Becky! ver 1.25.06 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200402/1148 X-Sequence-Number: 57859 On Thu, 26 Feb 2004 16:47:10 -0500, Alexander Cohen wrote: > Im trying to get a list of all groups that a certain user is a member > of. Can anyone help me with the sql to get that? select groname >from pg_group where (select usesyside from pg_shadow where usename = 'postgres') = any(grolist); klint. +---------------------------------------+-----------------+ : Klint Gore : "Non rhyming : : EMail : kg@kgb.une.edu.au : slang - the : : Snail : A.B.R.I. : possibilities : : Mail University of New England : are useless" : : Armidale NSW 2351 Australia : L.J.J. : : Fax : +61 2 6772 5376 : : +---------------------------------------+-----------------+