Skip site navigation (1) Skip section navigation (2)

Re: Group Query

From: Achilleus Mantzios <achill(at)matrix(dot)gatewaynet(dot)com>
To: Rob Kirkbride <rob(at)rkcomputing(dot)co(dot)uk>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Group Query
Date: 2005-12-14 13:43:37
Message-ID: Pine.LNX.4.44.0512141541050.16112-100000@matrix.gatewaynet.com (view raw or flat)
Thread:
Lists: pgsql-jdbc
O Rob Kirkbride έγραψε στις Dec 14, 2005 :

> Hi,
> 
> It's probably because I'm struggling with array queries but how can I 
> get the (textual) list of groups allocated to the current user?
> 
> I can get the current_user and extract the id out of pg_user, however I 
> need to then match this to an element as part of a list in pg_group, 
> this is the part I can't find how how to do. I'd like it as a ResultSet 
> with each element with the textual group name
> 
> Thanks for any help,

st=con.preparedStatement(select groname from pg_group where ?=any(grolist));
st.setInt(1,uid);

maybe?
> 
> Rob
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster
> 

-- 
-Achilleus


In response to

  • Group Query at 2005-12-14 11:00:48 from Rob Kirkbride

Responses

pgsql-jdbc by date

Next:From: Andres OlarteDate: 2005-12-14 16:38:24
Subject: Re: CallableStatements: index starts at 2
Previous:From: Rob KirkbrideDate: 2005-12-14 12:57:31
Subject: Re: Group Query

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group