Re: Is a SERIAL column a "black box", or not? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Is a SERIAL column a "black box", or not?
Date
Msg-id 21061.1146527743@sss.pgh.pa.us
Whole thread Raw
In response to Re: Is a SERIAL column a "black box", or not?  ("Jim C. Nasby" <jnasby@pervasive.com>)
List pgsql-hackers
"Jim C. Nasby" <jnasby@pervasive.com> writes:
> On Mon, May 01, 2006 at 11:25:33AM -0400, Tom Lane wrote:
>> mark@mark.mielke.cc writes:
>>> Ah. I was wondering about that. When I saw the first poster tag
>>> 'SECURITY DEFINER' on the end of the expression I assumed it was
>>> something that I didn't know you could do... :-)
>> 
>> No, he was inventing syntax that doesn't exist.

> Which begs the question, how hard would it be to add that syntax?

Well, we could.  The arguments against would come down to (a) nonstandard
syntax, and (b) possibly needing to make SECURITY a more-reserved word.
(We could avoid point (b) by using something that's already pretty
reserved --- one idea that comes to mind is DEFAULT ... AS OWNER.)

The discussion I was having with Bruno this morning essentially amounted
to doing this automatically, rather than having syntax to enable it.
I guess that backwards compatibility and spec compatibility might be
good arguments for not doing it automatically, though.

I could live with something like this if there's not major objections
out there.

BTW, has anyone looked into whether any of the other major DBs have
something similar?  You'd think anyone with sequence-like objects
would have run into this issue.  If there is precedent we might want
to follow it.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Is a SERIAL column a "black box", or not?
Next
From: Christopher Kings-Lynne
Date:
Subject: Re: Is a SERIAL column a "black box", or not?