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.

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match

Reply via email to