X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 896869F9429 for ; Fri, 19 May 2006 06:54:46 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 28684-05 for ; Fri, 19 May 2006 06:54:36 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from matrix.gatewaynet.com (host2.dynacom.ondsl.gr [62.103.35.210]) by postgresql.org (Postfix) with ESMTP id 7E4449F9430 for ; Fri, 19 May 2006 06:54:36 -0300 (ADT) Received: from matrix.gatewaynet.com (localhost.localdomain [127.0.0.1]) by matrix.gatewaynet.com (8.12.8/8.12.8) with ESMTP id k4JA4wew003518; Fri, 19 May 2006 13:04:58 +0300 Received: from localhost (achill@localhost) by matrix.gatewaynet.com (8.12.8/8.12.8/Submit) with ESMTP id k4JA4wcJ003514; Fri, 19 May 2006 13:04:58 +0300 Date: Fri, 19 May 2006 13:04:58 +0300 (EEST) From: Achilleus Mantzios To: Kis =?iso-8859-2?q?J=E1nos_Tam=E1s?= cc: pgsql-sql@postgresql.org Subject: Re: usernames of a group from SQL In-Reply-To: <200605191040.04885.kjt@takarnet.hu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=ISO-8859-7 Content-Transfer-Encoding: 8BIT X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200605/154 X-Sequence-Number: 25185 O Kis János Tamás Ýăńářĺ óôéň May 19, 2006 : > Hi, > > At the first time: I'm in newbie in SQL... I'm sorry! > > My question is: How can I get the usernames of a group (for example > 'osztatlan_users') from SQL? > > I try it: > > SELECT usename > FROM pg_user > WHERE usesysid IN (SELECT grolist FROM pg_group WHERE > groname='osztatlan_users') > ORDER BY pg_user; > > But I get the next error message: > > ERROR: operator does not exist: oid = oid[] > HINT: No operator matches the given name and argument type(s). You > may need to add explicit type casts. > > I see, what is the problem, but what can I do...? SELECT u.usename from pg_user u,pg_group g where u.usesysid = any (g.grolist) and g.groname='osztatlan_users'; > > Thans, > kjt > > > McAfee SCM 4.1 által ellenőrizve! > > ---------------------------(end of broadcast)---------------------------TIP 4: Have you searched our list archives? > http://archives.postgresql.org > -- -Achilleus