Search Postgresql Archives

Re: Best practice to grant all privileges on all bjects in database?

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

 



On 5/26/06, Jim Nasby <jnasby@xxxxxxxxxxxxx> wrote:
Only helps if the OP is willing to run on HEAD; grant on sequence is
not in 8.1 (at least not according to the docs).

you can grant on sequences using syntax for tables. works:

(pgdba@[local]:5810) 08:59:21 [depesz]
# create sequence test;
CREATE SEQUENCE

(pgdba@[local]:5810) 08:59:27 [depesz]
# \c - depesz
You are now connected as new user "depesz".

(depesz@[local]:5810) 08:59:29 [depesz]
> select nextval('test');
ERROR:  permission denied for sequence test

(depesz@[local]:5810) 08:59:34 [depesz]
> \c - pgdba
You are now connected as new user "pgdba".

(pgdba@[local]:5810) 08:59:36 [depesz]
# grant select, update on table test to depesz;
GRANT

(pgdba@[local]:5810) 08:59:43 [depesz]
# \c - depesz
You are now connected as new user "depesz".

(depesz@[local]:5810) 08:59:46 [depesz]
> select nextval('test');
 nextval
---------
       1
(1 row)


though i can't find it anywhere in documentation :(

depesz

--
http://www.depesz.com/ - nowy, lepszy depesz

[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