Re: Strange Grant behavior in postgres 8.3 - Mailing list pgsql-general

From John R Pierce
Subject Re: Strange Grant behavior in postgres 8.3
Date
Msg-id 499B8B69.1080505@hogranch.com
Whole thread Raw
In response to Re: Strange Grant behavior in postgres 8.3  (Schwaighofer Clemens <clemens.schwaighofer@tequila.jp>)
Responses Re: Strange Grant behavior in postgres 8.3
Re: Strange Grant behavior in postgres 8.3
List pgsql-general
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



pgsql-general by date:

Previous
From: Schwaighofer Clemens
Date:
Subject: Re: transfering tables into other schema
Next
From: Clemens Schwaighofer
Date:
Subject: Re: Strange Grant behavior in postgres 8.3