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

Re: Help with a query

From: "Bas Scheffers" <bas(at)scheffers(dot)net>
To: pgsql-general(at)postgresql(dot)org
Cc: alex(at)toomuchspace(dot)com
Subject: Re: Help with a query
Date: 2004-02-27 10:32:26
Message-ID: 4016.217.205.40.94.1077877946.squirrel@io.scheffers.net (view raw or flat)
Thread:
Lists: pgsql-general
If the user/groups you are talking about are postgres users and groups,
this is it:

select * from pg_catalog.pg_group where (select usesysid from
pg_catalog.pg_user where usename = 'user') = any(grolist)

The place to find this kind of thing is the Postgres Internals section
(system catalogs) that desribes the system tables. "any" is an array
function which is needed as the users that belong to a group are an array
of INT user ids.

Hope that helps,
Bas.

pgsql-general by date

Next:From: Simon WindsorDate: 2004-02-27 12:06:58
Subject: Case of strings
Previous:From: Karel ZakDate: 2004-02-27 10:09:40
Subject: Re: [HACKERS] ORDER BY different locales

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