> On Mon, 8 Aug 2005, Joshua D. Drake wrote:
>> Marc G. Fournier wrote:
>>> Is there a way of REVOKEing privileges on all tables in a database? I've
>>> checked the REVOKE man page, and there doesn't appear to be, but I figured
>>> I'd double check to make sure ...
>> No. This has actually been a requested feature on the grant side as well...
>> Nothing a simple for loop can't do with perl though.
> Ya, that is what I did, it just seemed that there should be a much
> simplier way of doing it :( Ah well, at least I wasn't re-creating the
> wheel on this one :)
I like doing things like with just psql as shown below. And, I get to
look at the commands before running them. For example: something
like this to revoke all for all tables in the public schema:
-- Turn off headers:
-- Use SQL to build SQL:
SELECT 'REVOKE ALL ON public.' || table_name || ' FROM PUBLIC;'
WHERE table_type = 'BASE TABLE' AND table_schema='public';
-- If the output looks good, write it to a file and run it:
It works pretty well on similar tasks, at least until you run into string
In response to
pgsql-admin by date
|Next:||From: Ramesh Patel||Date: 2005-08-11 07:33:24|
|Subject: Problem in restore data|
|Previous:||From: Magnus Hagander||Date: 2005-08-10 19:23:31|
|Subject: Re: Trouble Getting Database Server Started|