Re: [HACKERS] Inconsistent syntax in GRANT

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Marko Kreen <markokr(at)gmail(dot)com>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, 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:33:26
Message-ID: 25908.1136608406@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

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.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2006-01-07 04:38:00 Re: [HACKERS] Inconsistent syntax in GRANT
Previous Message Bruce Momjian 2006-01-07 04:12:11 Re: [HACKERS] Inconsistent syntax in GRANT

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2006-01-07 04:38:00 Re: [HACKERS] Inconsistent syntax in GRANT
Previous Message Bruce Momjian 2006-01-07 04:12:11 Re: [HACKERS] Inconsistent syntax in GRANT