From: Bruno Wolff III <bruno@wolff.to>
To: David Olbersen <DOlbersen@stbernard.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: CREATE GROUP question
Date: Fri, 23 May 2003 10:17:01 -0500
Message-ID: <20030523151701.GC3935@wolff.to> (raw)
In-Reply-To: <E7E213858379814A9AE48CA6754F5ECB0D6E67@mail01.stbernard.com>
References: <E7E213858379814A9AE48CA6754F5ECB0D6E67@mail01.stbernard.com>
On Thu, May 22, 2003 at 15:04:19 -0700,
David Olbersen <DOlbersen@stbernard.com> wrote:
> Hello all,
>
> Looking at the documentation for 7.3 I see that I can create a group and populate it with users at the same time:
>
> CREATE GROUP foo WITH USER joe, john, jane;
>
> Looking at the ALTER GROUP and CREATE GROUP documentation I only see "ADD|DROP USER" and "WITH USER" as options, nothing to do with other groups.
>
> What I'd like to do is create a group which contains groups.
> Can I do that at all? It doesn't look like it according to the documentation, and the question isn't raised. I tried searching the list archives at:
> http://archives.postgresql.org/search.php
> but never got results back as my browser waited forever for ads.area902.com to respond. A quick search on http://groups.google.com also didn't find what I was looking for.
The group commands doesn't allow for groups within groups. You can use
expressions of the usernames on the group commands so you can't directly
pull the data out of the database. What you could do is run a script
that extracts group information out of the database and then rebuild
the group lists. If you maintain the list in user tables you can even have
a trigger that would run a function that would rebuild the groups for
you. (You can't put triggers on system tables which is why the data needs
to be in a user table to do this.)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: bruno@wolff.to, DOlbersen@stbernard.com
Subject: Re: CREATE GROUP question
In-Reply-To: <20030523151701.GC3935@wolff.to>
References: <E7E213858379814A9AE48CA6754F5ECB0D6E67@mail01.stbernard.com> <20030523151701.GC3935@wolff.to>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox