Re: Is a SERIAL column a "black box", or not?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Is a SERIAL column a "black box", or not?
Дата
Msg-id 21061.1146527743@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Is a SERIAL column a "black box", or not?  ("Jim C. Nasby" <jnasby@pervasive.com>)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Is a SERIAL column a "black box", or not?
Следующее
От: Christopher Kings-Lynne
Дата:
Сообщение: Re: Is a SERIAL column a "black box", or not?