Search Postgresql Archives

Re: Question about Privileges

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux