pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Dan Wilson <phpPgAdmin@acucore.com>
To: W. van den Akker <wvdakker@wilsoft.nl>
To: pgsql-general@postgresql.org
Subject: Re: User Privileges
Date: Thu, 28 Dec 2000 01:42:12 -0800
Message-ID: <00b101c070b2$754f6140$078353d8@danwilson> (raw)
References: <328DC4EC2C9B74428D8DAED1931285BF10D987@FLAN-EXCH01.corp.insage.com>
	<004701c06f69$3abe1980$078353d8@danwilson>
	<000401c06fda$b65ce9b0$0500020a@wilsoft.nl>

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




view thread (12+ messages)  latest in thread

Message-ID: <00b101c070b2$754f6140$078353d8@danwilson>
Permalink:  ../00b101c070b2$754f6140$078353d8@danwilson/
Also on:    postgresql.org/message-id/00b101c070b2$754f6140$078353d8@danwilson

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: phpPgAdmin@acucore.com, wvdakker@wilsoft.nl
  Subject: Re: User Privileges
  In-Reply-To: <00b101c070b2$754f6140$078353d8@danwilson>
  References: <328DC4EC2C9B74428D8DAED1931285BF10D987@FLAN-EXCH01.corp.insage.com> <004701c06f69$3abe1980$078353d8@danwilson> <000401c06fda$b65ce9b0$0500020a@wilsoft.nl> <00b101c070b2$754f6140$078353d8@danwilson>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox