From: | "Magnus Hagander" <mha(at)sollentuna(dot)net> |
---|---|
To: | <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Permissions vs SERIAL columns |
Date: | 2005-12-30 18:32:18 |
Message-ID: | 6BCB9D8A16AC4241919521715F4D8BCE92E965@algol.sollentuna.se |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Haven't seen this discussed in a while, but I do recall it being
mentioned sometime before...
The problem:
testdb=# create table mytable (id serial, txt text);
testdb=# grant insert on mytable to user2;
GRANT
testdb=# \connect testdb user2
You are now connected to database "testdb" as user "user2".
testdb=> insert into mytable (txt) values ('foobar');
ERROR: permission denied for sequence mytable_id_seq
What I'd like to happen is for the grant for INSERT on the table to
cascade into an UPDATE permission on the sequence (when associated with
a SERIAL column only, of course).
Coming from a different database, such as MSSQL, makes people forget
this very easily, and it becomes very annoying.
Is this something that can be done without too much work? Anything you
can do in current pg even, just me not knowing how?
//Magnus
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2005-12-30 18:36:06 | Re: broken 'SHOW TABLE'-like query works in 8, not 8.1.1 |
Previous Message | Michael Fuhr | 2005-12-30 18:02:20 | Re: broken 'SHOW TABLE'-like query works in 8, not 8.1.1 |