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@nsi.edu]Sent: Monday, May 03, 1999 6:05 PMTo:
pgsql-sql@postgreSQL.orgSubject: [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'veonly been able to do this table by table.
Thanks.-Tony