Re: Granting Privileges in Postgres

From: John R Pierce <pierce(at)hogranch(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Granting Privileges in Postgres
Date: 2011-08-08 05:03:45
Message-ID: 4E3F6E31.2070706@hogranch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 08/07/11 9:58 PM, Adarsh Sharma wrote:
> Dear all,
>
> Today I researched on giving privileges in Postgres databases. I have
> 4 databases and near about 150 tables, 50-60 sequences and also some
> views in it.
>
> I want to give privileges to a new user in all these objects. I
> created a function for that but don't know how to give privileges on
> all objects all at once.

GRANT ALL ON ALL TABLES IN SCHEMA schema_name TO rolename;

this ON ALL TABLE IN SCHEMA option is new in 9.0

--
john r pierce N 37, W 122
santa cruz ca mid-left coast

In response to

Browse pgsql-general by date

  From Date Subject
Next Message - - 2011-08-08 05:27:49 Re: Query with rightmost function does not use index
Previous Message Adarsh Sharma 2011-08-08 04:58:37 Granting Privileges in Postgres