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

From Tom Lane
Subject Re: [HACKERS] Inconsistent syntax in GRANT
Date
Msg-id 9731.1136509283@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] Inconsistent syntax in GRANT  (Josh Berkus <josh@agliodbs.com>)
Responses Re: [HACKERS] Inconsistent syntax in GRANT  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-patches
Josh Berkus <josh@agliodbs.com> writes:
>> Uh, how are they different?   You mean just UPDATE and none of the
>> others do anything?

> Yes, it would be nice to have real permissions for sequences, specifically
> USE (which allows nextval() and currval()) and UPDATE (which would allow
> setval() ).   However, I don't know that the added functionality would
> justify breaking backwards-compatibility.

We could maintain backwards compatibility by continuing to accept the
old equivalences when you say GRANT ON TABLE.  But when you say GRANT ON
SEQUENCE, I think it should use sequence-specific privilege keywords,
and not allow the privileges that don't mean anything for sequences,
like DELETE.

I'm not sure offhand what keywords we'd want to use, but now is the time
to look at it, *before* it becomes set in stone that GRANT ON SEQUENCE
is just another spelling of GRANT ON TABLE.

(The subtext of this is that I don't have a lot of use for allowing
variant syntaxes that don't actually do anything different ...)

            regards, tom lane

pgsql-patches by date:

Previous
From: Mark Kirkwood
Date:
Subject: Re: Summary table trigger example race condition
Next
From: "Hiroshi Saito"
Date:
Subject: display and expression of the home directory in Win32