Search Postgresql Archives

Re: alter default privileges problem

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

 



"Gauthier, Dave" <dave.gauthier@xxxxxxxxx> writes:
> create user "select" password 'select';
> create user "insert" password 'insert';
> alter default privileges for user "insert" grant select on tables to "select";
> alter default privileges for user "insert" grant select on sequences to "select";
> alter default privileges for user "insert" grant execute on functions to "select";

> Disconnect.  Reconnect as user "insert", then...

> create table foo (a text);
> insert into foo (a) values ('aaa');

> Disconnect.  Reconnect as user "select", expecting to be able to select contents of the "foo" table, but fails with "permission denied for relation foo".

Works for me.  Maybe you've got some schema search path confusion,
or some such?  "\dp foo" in psql might be enlightening, too.  What
I see is

regression=> \dp foo
                            Access privileges
 Schema | Name | Type  |   Access privileges   | Column access privileges 
--------+------+-------+-----------------------+--------------------------
 public | foo  | table | select=r/insert      +| 
        |      |       | insert=arwdDxt/insert | 
(1 row)


			regards, tom lane


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