Re: [HACKERS] Inconsistent syntax in GRANT

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Jaime Casanova <systemguards(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Marko Kreen <markokr(at)gmail(dot)com>, Bruno Wolff III <bruno(at)wolff(dot)to>, Josh Berkus <josh(at)agliodbs(dot)com>, PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [HACKERS] Inconsistent syntax in GRANT
Date: 2006-01-06 22:01:19
Message-ID: 200601062201.k06M1Ji21556@candle.pha.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Jaime Casanova wrote:
> On 1/6/06, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> > Marko Kreen <markokr(at)gmail(dot)com> writes:
> > > But my question is rather - is there any scenario where setval() should
> > > go with nextval()?
> >
> > > It seems that their pairing is an accident and should be fixed.
> >
> > I think the original argument for the current design was that with
> > enough nextval's you can duplicate the effect of a setval. This is only
> > strictly true if the sequence is CYCLE mode, and even then it'd take a
> > whole lot of patience to wrap an int8 sequence around ... but the
> > distinction between them is not so large as you make it out to be.
> >
> > In any case I think we are wasting our time discussing it, and instead
> > should be looking through the SQL2003 spec to see what it requires.
>
> 5WD-02-Foundation-2003-09.pdf
>
> look at:
> 4.34.2 Privileges. . . . . . . . . . . . . . . . . . . . . . . . . . .
> . . . . . . . . . . . . 112
> and
> 12.3 <privileges>. . . . . . . . . . . . . . . . . . . . . . . . . . .
> . . . . . . . . . . . . 739
>
> this is taken from the 12.3
>
> 3) If <object name> specifies a <domain name>, <collation name>,
> <character set name>, <transliteration name>, <schema-resolved
> user-defined type name>, or <sequence generator name>, then
> <privileges> may specify USAGE. Otherwise, USAGE shall not be
> specified.

Yes, I saw that, but how does that hook into nextval/setval/currval()?
I think I see it in 6.13:

a) If <next value expression> is contained in a <schema definition>,
then the applicable privileges for the <authorization identifier> that
owns the containing schema shall include USAGE privilege on the sequence
generator identified by <sequence generator name>.

Is that it?

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

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Marko Kreen 2006-01-06 22:10:29 Re: [HACKERS] Inconsistent syntax in GRANT
Previous Message Bruce Momjian 2006-01-06 21:49:05 Re: [HACKERS] Inconsistent syntax in GRANT