Search Postgresql Archives

Re: Strange Grant behavior in postgres 8.3

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

 



Schwaighofer Clemens wrote:
So what do I do wrong? Even if I do the GRANT command as user 'foo'
who is the database owner, I still cannot select with the user 'bar'.
It only works if I set GRANT rights for the TABLE itself:

as user 'foo' logged in
=> grant all on table test to bar;

that is correct. DATABASE privileges relate to connecting to the database, permissions to create objects and so forth.


each object in the database has its own access rights.

for typical application use, I create teh database so the primary application account owns the database, then let that account create all the tables so it owns those too.

$ sudo -u postgres createuser someuser
$ sudo -u postgres createdb -o someuser somedb

then access this database with that user to create the tables and such



--
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