| From: | David Wheeler <david(at)wheeler(dot)net> |
|---|---|
| To: | pgsql-general(at)postgresql(dot)org |
| Subject: | Grant on Database? |
| Date: | 2001-02-21 01:01:23 |
| Message-ID: | Pine.LNX.4.21.0102201656180.14743-100000@theory |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
Hey All,
We have a need to grant privileges on entire databases to users and/or
groups. It looks like GRANT just grants on tables and sequences, but I'd
like to know if there's a more direct way to do it. What I'm doing now
is getting a list of tables and sequences and calling grant for each one
in turn. How am I getting this list (I'm user Perl, not psql)? With this
query:
SELECT relname
FROM pg_class
WHERE relkind IN ('r', 'S')
AND relowner IN (
SELECT usesysid
FROM pg_user
WHERE LOWER(usename) = 'myuser')
Anyway, pointers to any shortcuts for this would be greatly appreciated.
Thanks,
David
--
David Wheeler
Software Engineer
Creation Engines, Inc. ICQ: 15726394
david(at)creationengines(dot)com AIM: dwTheory
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Stephan Szabo | 2001-02-21 01:02:22 | Re: Weird indices |
| Previous Message | Joseph Shraibman | 2001-02-21 00:55:45 | Re: Weird indices |