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

From: "hubert depesz lubaczewski" <depesz(at)gmail(dot)com>
To: "Jim Nasby" <jnasby(at)pervasive(dot)com>
Cc: "Bruno Wolff III" <bruno(at)wolff(dot)to>, "Joe Kramer" <cckramer(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Best practice to grant all privileges on all bjects in database?
Date: 2006-05-26 07:00:31
Message-ID: 9e4684ce0605260000j12d3c11du86be1560c110f0f4@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 5/26/06, Jim Nasby <jnasby(at)pervasive(dot)com> 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(at)[local]:5810) 08:59:21 [depesz]
# create sequence test;
CREATE SEQUENCE

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

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

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

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

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

(depesz(at)[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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message kmi 2006-05-26 07:02:44 Making query without trigger
Previous Message Rafal Pietrak 2006-05-26 06:30:50 Re: Restricting access to rows?