Re: [GENERAL] Strange Grant behavior in postgres 8.3

2009-02-18 Thread Schwaighofer Clemens
On Wed, Feb 18, 2009 at 17:42, Scott Marlowe wrote: > On Tue, Feb 17, 2009 at 9:20 PM, Clemens Schwaighofer > wrote: > >> But yesterday I run in some issues with table ownership and thought if I >> just give the user all rights for the DB, he should have all rights to >> the tables too. > > Try g

Re: [GENERAL] Strange Grant behavior in postgres 8.3

2009-02-18 Thread Scott Marlowe
On Tue, Feb 17, 2009 at 9:20 PM, Clemens Schwaighofer wrote: > But yesterday I run in some issues with table ownership and thought if I > just give the user all rights for the DB, he should have all rights to > the tables too. Try granting select on a database and you will get this: grant selec

Re: [GENERAL] Strange Grant behavior in postgres 8.3

2009-02-18 Thread Albe Laurenz
John R Pierce wrote: > that is correct. DATABASE privileges relate to connecting to the > database, permissions to create objects and so forth. To be precise, there are 3 privileges: - create temporary tables - connect to the database - create schemata To be allowed to create a table, you need

Re: [GENERAL] Strange Grant behavior in postgres 8.3

2009-02-17 Thread Schwaighofer Clemens
On Wed, Feb 18, 2009 at 16:09, John R Pierce wrote: > Clemens Schwaighofer wrote: >> >> The other problem is, that there is no "grant all on table db.* ..." but >> I have to do that for each table seperate, or in a "grant all on table >> a, b, ...". >> >> I am not sure if there is an easier way, e

Re: [GENERAL] Strange Grant behavior in postgres 8.3

2009-02-17 Thread John R Pierce
Clemens Schwaighofer wrote: The other problem is, that there is no "grant all on table db.* ..." but I have to do that for each table seperate, or in a "grant all on table a, b, ...". I am not sure if there is an easier way, except perhaps through a select from the pg_ catalog for this db and ge

Re: [GENERAL] Strange Grant behavior in postgres 8.3

2009-02-17 Thread Clemens Schwaighofer
On 02/18/2009 01:15 PM, John R Pierce wrote: > 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'

Re: [GENERAL] Strange Grant behavior in postgres 8.3

2009-02-17 Thread John R Pierce
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

Re: [GENERAL] Strange Grant behavior in postgres 8.3

2009-02-17 Thread Schwaighofer Clemens
Sorry for some confusion. I re-created the whole thing again with fresh users and a fresh database: (1) Create a new user and a new db, also create a table 'test' inside with user 'foo' $> createuser -U postgres -P -E foo $> createdb -U postgres -O foo -E utf8 foo_test (2) create a second user

Re: [GENERAL] Strange Grant behavior in postgres 8.3

2009-02-17 Thread Albe Laurenz
Schwaighofer Clemens wrote: > Version: > PostgreSQL 8.3.5 on i486-pc-linux-gnu, compiled by GCC gcc-4.3.real(Debian > 4.3.2-1) 4.3.2 > > I have a DB "foo" created and owned by postgres. > > No I created another role called "bar" and with the user postgres in > the db foo I did: > > #> grant all

[GENERAL] Strange Grant behavior in postgres 8.3

2009-02-17 Thread Schwaighofer Clemens
Version: PostgreSQL 8.3.5 on i486-pc-linux-gnu, compiled by GCC gcc-4.3.real (Debian 4.3.2-1) 4.3.2 I have a DB "foo" created and owned by postgres. No I created another role called "bar" and with the user postgres in the db foo I did: #> grant all on foo to bar; when I select from pg_database