pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Travis Whitton <whitton@atlantic.net>
To: pgsql-admin@postgresql.org
Subject: Grant Question
Date: Mon, 12 May 2003 21:11:47 GMT
Message-ID: <slrnbc045f.42h.whitton@grub.ath.cx> (raw)

Hi - I'm new to postgreSQL, and I'm having some issues with using GRANT.
I'm looking for a way to grant privileges on all tables in a given database
to a user. I can accomplish this using individual grant statements for each
table; however, a global grant is not working for me. Here's an example.

template1=# CREATE DATABASE dummy;
CREATE DATABASE

edit=# \c dummy;
You are now connected to database dummy.

dummy=# CREATE TABLE test (id int);
CREATE TABLE

dummy=# CREATE TABLE test2 (id int);
CREATE TABLE

dummy=# GRANT ALL ON DATABASE dummy TO devel;
GRANT

dummy=# \dp
Access privileges for database "dummy"
Schema | Table | Access privileges 
--------+-------+-------------------
 public | test  | 
 public | test2 | 
(2 rows)

No privileges...

dummy=# GRANT ALL ON test TO devel;
GRANT

dummy=# \dp
Access privileges for database "dummy"
Schema | Table |         Access privileges          
--------+-------+------------------------------------
 public | test  | {=,postgres=arwdRxt,devel=arwdRxt}
 public | test2 | 
(2 rows)

This works but only by referencing a specific table. Any
help would be appreciated.

Thanks,
Travis Whitton <whitton@atlantic.net>




view thread (12+ messages)  latest in thread

Message-ID: <slrnbc045f.42h.whitton@grub.ath.cx>
Permalink:  ../slrnbc045f.42h.whitton@grub.ath.cx/
Also on:    postgresql.org/message-id/slrnbc045f.42h.whitton@grub.ath.cx

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: whitton@atlantic.net
  Subject: Re: Grant Question
  In-Reply-To: <slrnbc045f.42h.whitton@grub.ath.cx>

* 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