From: | Jaime Casanova <systemguards(at)gmail(dot)com> |
---|---|
To: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
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:15:17 |
Message-ID: | c2d9e70e0601061415o4accdb3cn75d80c969d4858ac@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-patches |
On 1/6/06, Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> wrote:
> 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?
>
USAGE is the only privilege that the standard consider applicable for the owner?
it covers all operations in sequences...
--
regards,
Jaime Casanova
(DBA: DataBase Aniquilator ;)
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2006-01-06 22:32:40 | Re: [HACKERS] Inconsistent syntax in GRANT |
Previous Message | Marko Kreen | 2006-01-06 22:10:29 | Re: [HACKERS] Inconsistent syntax in GRANT |