RE: [SQL] Granting select on ALL tables at once

From: Michael J Davis <michael(dot)j(dot)davis(at)tvguide(dot)com>
To: "'G(dot) Anthony Reina'" <reina(at)nsi(dot)edu>, pgsql-sql(at)postgreSQL(dot)org
Subject: RE: [SQL] Granting select on ALL tables at once
Date: 1999-05-04 05:52:43
Message-ID: 93C04F1F5173D211A27900105AA8FCFC145474@lambic.prevuenet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

I use the following technique a lot:

-- create a file containing a bunch of grant commands
\g grant_all.sql
select (('GRANT ALL ON ' || relname) || ' TO PUBLIC;') as "-- grant"
FROM pg_class WHERE relkind = 'r' and substr(relname,1,3) <> 'pg_'
order by relname; -- table and views
\g
-- execute the file of grant commends
\i grant_all.sql

-----Original Message-----
From: G. Anthony Reina [SMTP:reina(at)nsi(dot)edu]
Sent: Monday, May 03, 1999 6:05 PM
To: pgsql-sql(at)postgreSQL(dot)org
Subject: [SQL] Granting select on ALL tables at once

Is there a way to grant a select to a user on all tables. So far,
I've
only been able to do this table by table.

Thanks.
-Tony

Browse pgsql-sql by date

  From Date Subject
Next Message Richard Chrenko 1999-05-04 08:27:52 how to get "autonumber" when using INSERT INTO
Previous Message G. Anthony Reina 1999-05-04 00:04:44 Granting select on ALL tables at once