From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | 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-07 04:38:00 |
Message-ID: | 200601070438.k074c0k02872@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
Tom Lane wrote:
> Marko Kreen <markokr(at)gmail(dot)com> writes:
> > Good point about compatibility. But makes the common case ugly.
> > "For regular usage you need to grant SELECT, USAGE ..." Huh? :)
>
> > How about this:
>
> > SELECT: currval
> > INSERT: nextval
> > UPDATE: nextval, setval
> > USAGE: nextval, currval
>
> Seems a little weird. Hmm ... what is the use-case for allowing someone
> to do nextval but not currval? I can't see one. How about we simplify
> this to
>
> SELECT: currval
> UPDATE: nextval, setval
> USAGE: nextval, currval
>
> This is still upward compatible with our old behavior, which is
>
> SELECT: currval
> UPDATE: nextval, setval
>
> and it still meets the SQL spec's requirement that USAGE allow nextval,
> and USAGE is the only one you need for "normal" usage.
I think your original proposal was better. Why is it important that we
have a single-keyword usage for the common case? No one has complained
about what we have now and that requires two keywords just like your
proposal. We don't have a shorthand for GRANT INSERT/UPDATE/DELETE. In
fact, if it was backward-compatible I would suggest we make UPDATE just
setval. Does the standard require USAGE to support currval?
--
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
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2006-01-07 04:38:27 | Re: Warning on certain configuration file changes |
Previous Message | Tom Lane | 2006-01-07 04:33:26 | Re: [HACKERS] Inconsistent syntax in GRANT |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2006-01-07 04:52:31 | Re: [HACKERS] Inconsistent syntax in GRANT |
Previous Message | Tom Lane | 2006-01-07 04:33:26 | Re: [HACKERS] Inconsistent syntax in GRANT |