pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedCREATE GROUP question
2+ messages / 2 participants
[nested] [flat]
* CREATE GROUP question
@ 2003-05-22 22:04 David Olbersen <DOlbersen@stbernard.com>
0 siblings, 1 reply; 2+ messages in thread
From: David Olbersen @ 2003-05-22 22:04 UTC (permalink / raw)
To: pgsql-admin
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.
All help is appreciated.
--------------------------
David Olbersen
iGuard Engineer
11415 West Bernardo Court
San Diego, CA 92127
1-858-676-2277 x2152
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: CREATE GROUP question
@ 2003-05-23 15:17 Bruno Wolff III <bruno@wolff.to>
parent: David Olbersen <DOlbersen@stbernard.com>
0 siblings, 0 replies; 2+ messages in thread
From: Bruno Wolff III @ 2003-05-23 15:17 UTC (permalink / raw)
To: David Olbersen <DOlbersen@stbernard.com>; +Cc: pgsql-admin
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.)
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2003-05-23 15:17 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-05-22 22:04 CREATE GROUP question David Olbersen <DOlbersen@stbernard.com>
2003-05-23 15:17 ` Bruno Wolff III <bruno@wolff.to>
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