grant insert for single tables does not work

Started by PostgreSQL Bugs Listalmost 25 years ago3 messagesbugs
Jump to latest
#1PostgreSQL Bugs List
pgsql-bugs@postgresql.org

Harald Bartel (harald.bartel@prozentor) reports a bug with a severity of 3
The lower the number the more severe it is.

Short Description
grant insert for single tables does not work

Long Description
Version: PostgreSQL 7.1
System: Debian Woody, both Linux 2.2.14 and 2.4.3.1

It is not possible to grant insert for a single table. Granting this
right only works if grant all is used.

Sample Code

No file was uploaded with this report

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: PostgreSQL Bugs List (#1)
Re: grant insert for single tables does not work

pgsql-bugs@postgresql.org writes:

It is not possible to grant insert for a single table. Granting this
right only works if grant all is used.

Works for me:

<< as postgres >>

regression=# create user foo;
CREATE USER
regression=# create table zz (f1 int);
CREATE

<< as foo >>

regression=> select * from zz;
ERROR: zz: Permission denied.
regression=> insert into zz values(22);
ERROR: zz: Permission denied.

<< as postgres >>

regression=# grant insert on zz to foo;
CHANGE

<< as foo >>

regression=> insert into zz values(22);
INSERT 939431 1
regression=> select * from zz;
ERROR: zz: Permission denied.
regression=> update zz set f1 = 33;
ERROR: zz: Permission denied.
regression=>

If you think there's a problem you're going to have to be more
specific.

regards, tom lane

#3Peter Eisentraut
peter_e@gmx.net
In reply to: PostgreSQL Bugs List (#1)
Re: grant insert for single tables does not work

Harald Bartel (harald.bartel@prozentor) reports a bug with a severity of 3

It is not possible to grant insert for a single table. Granting this
right only works if grant all is used.

Works here. More details required.

--
Peter Eisentraut peter_e@gmx.net http://funkturm.homeip.net/~peter