Re: [pgsql-hackers] Allow GRANT/REVOKE permissions to be applied

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Matthias Schmidt <schmidtm(at)mock-software(dot)de>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [pgsql-hackers] Allow GRANT/REVOKE permissions to be applied
Date: 2005-02-15 03:53:59
Message-ID: 200502150353.j1F3rxH06354@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


I have added this syntax to the TODO list:

* Allow GRANT/REVOKE permissions to be applied to all schema objects with one
command

The proposed syntax is:
GRANT SELECT ON ALL TABLES IN public TO phpuser;
GRANT SELECT ON NEW TABLES IN public TO phpuser;

---------------------------------------------------------------------------

Matthias Schmidt wrote:
> Hi *,
>
> I will start implementing this stuff based on this syntax:
>
> GRANT SELECT ON ALL TABLES IN public TO phpuser;
> GRANT SELECT ON NEW TABLES IN public TO phpuser;
>
> so there are two seperate commands to use.
>
> is everybody fine with this aproach?
>
> cheers,
>
> Matthias
>
> PS.: Tom, shouldn't we mention the fact, that one can grant on views
> and sequences as well in the documentation?
>
>
>
> Am 29.01.2005 um 01:43 schrieb Tom Lane:
>
> > Josh Berkus <josh(at)agliodbs(dot)com> writes:
> >> GRANT SELECT ON ALL, NEW TABLES IN public TO phpuser;
> >> ... does both.
> >
> > Ah, I overlooked that part of your message. I think the above probably
> > doesn't work in bison, but if not we could spell it like
> >
> > GRANT SELECT ON ALL AND NEW TABLES IN public TO phpuser;
> >
> > Or just make the user enter two commands for this case. Aside from
> > syntactic simplicity, that might be a good idea anyway. The NEW TABLES
> > case is *fundamentally* different from every other form of GRANT, in
> > that it causes future actions. So it might be a wise idea from the
> > standpoint of understandability to keep it as a separate command from
> > the immediate-acting ALL TABLES.
> >
> > regards, tom lane
> >
> > ---------------------------(end of
> > broadcast)---------------------------
> > TIP 8: explain analyze is your friend
> >
> >
> ----------------------------------------------------------------------
> Matthias Schmidt
> Viehtriftstr. 49
>
> 67346 Speyer
> GERMANY
>
> Tel.: +49 6232 4867
> Fax.: +49 6232 640089
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Neil Conway 2005-02-15 03:55:38 Re: getting oid of function
Previous Message Tom Lane 2005-02-15 03:53:05 Re: enforcing a plan (in brief)