Re: User Privileges - Mailing list pgsql-general

From Dan Wilson
Subject Re: User Privileges
Date
Msg-id 00b101c070b2$754f6140$078353d8@danwilson
Whole thread Raw
In response to User Privileges  (Niral Trivedi <niral.trivedi@insage.com>)
List pgsql-general
SELECT relacl FROM pg_class WHERE relname = '[table name]'

The relacl column contains specific information that must then be parsed to
determine the users which have access to a the table and the privileges
granted.

Example:

{"=","dan=arw","group developers=arw"}

The first section means the PUBLIC does not have any privileges on the
table.  Each permission (SELECT, INSERT, UPDATE/DELETE, RULE) is signified
by a letter.  r = select, a = insert, w = update/delete, R = rule. User
"dan" has SELECT, INSERT, UPDATE/DELETE rights, but not RULE rights. Group
"developers" has the same privileges.

For more details --
http://www.postgresql.org/users-lounge/docs/7.0/user/sql-grant.htm

-Dan

----- Original Message -----
From: "W. van den Akker" <wvdakker@wilsoft.nl>
To: <pgsql-general@postgresql.org>
Sent: Tuesday, December 26, 2000 11:57 PM
Subject: Re: [GENERAL] User Privileges


> How do I retrieve this privilages?
> I want to disable menu-options within a program. For that I have to
> retrieve the privilages for some tables.
>
> gr,
>
> Willem
>
> ----- Original Message -----
> From: "Dan Wilson" <phpPgAdmin@acucore.com>
> To: "Niral Trivedi" <niral.trivedi@insage.com>;
> <pgsql-general@postgresql.org>
> Sent: Tuesday, December 26, 2000 7:25 PM
> Subject: Re: [GENERAL] User Privileges
>
>
> > > For example I have 5 tables in database A. And now I want to give
> > > SELECT/UPDATE/INSERT privileges to a user to all 5 tables. But
according
> > to
> > > documentation, I have to execute 'GRANT' query 3 times(for
> > > select/update/insert) per table. meaning total of 15 times!!!!
> >
> > That's incorrect... you can do it all in one statement:
> >
> > GRANT select,update,insert TO "<username>" ON
table_1,table_2,table_3,etc
> >
> > http://www.postgresql.org/users-lounge/docs/7.0/user/sql-grant.htm
> >
> > -Dan
> >
> >
> >
>


pgsql-general by date:

Previous
From: "W. van den Akker"
Date:
Subject: Re: User Privileges
Next
From: Stefano Bargioni
Date:
Subject: Cost of max