Re: Role syntax (or, SQL99 versus sanity) - Mailing list pgsql-hackers

From Jim C. Nasby
Subject Re: Role syntax (or, SQL99 versus sanity)
Date
Msg-id 20050628233053.GF50976@decibel.org
Whole thread Raw
In response to Role syntax (or, SQL99 versus sanity)  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Tue, Jun 28, 2005 at 12:29:22PM -0400, Tom Lane wrote:
> One objection to this is that misspelling a privilege keyword would
> give you a complaint about "unknown role", which might be a bit
> confusing; but I suspect we cannot avoid that anyway --- there is
> absolutely no basis on which we can say that
> 
>     GRANT INSIRT TO joe;

This alone makes me want to ditch the SQL99 syntax... IMHO there should
be a definative way to differentiate between a role grant and a
privilege grant. But I tend to agree that supporting SQL99 is a good
thing, so...

How horrid would it be to support both SQL99 and the suggested GRANT
ROLE syntax, possible with a means to turn off the SQL99 syntax. This
would allow catching typo'd GRANT privilege statements. Another
possibility is to support GRANT, GRANT ROLE, and GRANT PRIVILEGE, and
strongly suggest that users use the latter 2 and not the first one.
-- 
Jim C. Nasby, Database Consultant               decibel@decibel.org 
Give your computer some brain candy! www.distributed.net Team #1828

Windows: "Where do you want to go today?"
Linux: "Where do you want to go tomorrow?"
FreeBSD: "Are you guys coming, or what?"


pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: Implementing SQL/PSM for PG 8.2 - debugger
Next
From: Bruce Momjian
Date:
Subject: Re: For review: dbsize patch