Re: Question about Privileges - Mailing list pgsql-general

From John R Pierce
Subject Re: Question about Privileges
Date
Msg-id 49B99087.1050506@hogranch.com
Whole thread Raw
In response to Question about Privileges  (Jack W <dbdevelop2000@gmail.com>)
List pgsql-general
Jack W wrote:
>
> I also find that if I only grant privileges on database to dbuser as
> below, without granting privileges on Schema and table to dbuser,
> dbuser still can not do SELECT on the tables.
> mydb=# grant all privileges on Database mydb to dbuser;
>
> Is there any simple way to grant All privileges to dbuser on all the
> 10 tables?

the simplest way is to make dbuser the OWNER of the database, and have
him create all the tables too, then he automatically has full rights to it.

there are also various scripts that can be used to enumerate objects and
grant specific privileges...

    http://pgedit.com/public/sql/acl_admin/index.html
    http://unf.be/postgresql/postgres_grant_all.perl
    http://www.archonet.com/pgdocs/grant-all.html

in general, DATABASE privileges relate to connecting to that database,
and having the rights to create schemas in that database.

SCHEMA privileges grant the rights to connect to a schema, and
create/modify schemas

table/view/etc privileges grant the rights to select/insert/update/etc
the mentioned tables.

see http://www.postgresql.org/docs/current/static/sql-grant.html for
more specifics.

pgsql-general by date:

Previous
From: "A.M."
Date:
Subject: Re: nulls
Next
From: Tom Lane
Date:
Subject: Re: pg_standby error - can't find 00000001.history