Re: [HACKERS] Inconsistent syntax in GRANT - Mailing list pgsql-patches

From Tom Lane
Subject Re: [HACKERS] Inconsistent syntax in GRANT
Date
Msg-id 25908.1136608406@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] Inconsistent syntax in GRANT  (Marko Kreen <markokr@gmail.com>)
Responses Re: [HACKERS] Inconsistent syntax in GRANT
Re: [HACKERS] Inconsistent syntax in GRANT
List pgsql-patches
Marko Kreen <markokr@gmail.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.

            regards, tom lane

pgsql-patches by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Inconsistent syntax in GRANT
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Inconsistent syntax in GRANT