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

is a user in a group?

From: "Jacopo Silva" <jsilva(at)lynxtesoft(dot)it>
To: <pgsql-admin(at)postgresql(dot)org>
Subject: is a user in a group?
Date: 2000-11-10 14:28:10
Message-ID: 002e01c04b22$89e177c0$ (view raw, whole thread or download thread mbox)
Lists: pgsql-admin
I need to find out a quick way to check which groups a user
is member of.

In the pg_group table each group row has an array of
userids of the members of the group.
At the moment I am selecting all the rows than
searching in each array for the id of the user
I am looking for.

There should be something more elegant than this!!!
There should be a system table which I can use to find
the relation between user and groups.

I would be very grateful to anyone who can help me:-).



pgsql-admin by date

Next:From: Charlie CrissmanDate: 2000-11-10 15:08:10
Subject: table file size
Previous:From: Oleg BartunovDate: 2000-11-10 09:34:06
Subject: Re: Implementing mod_perl, Perl 5.004, and Postgres

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