Tom Lane wrote: > Marko Kreen <[EMAIL PROTECTED]> 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@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073 ---------------------------(end of broadcast)--------------------------- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly