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

Поиск
Список
Период
Сортировка
От Jim C. Nasby
Тема Re: Is a SERIAL column a "black box", or not?
Дата
Msg-id 20060501210441.GG97354@pervasive.com
обсуждение исходный текст
Ответ на Re: Is a SERIAL column a "black box", or not?  (Hannu Krosing <hannu@skype.net>)
Ответы Re: Is a SERIAL column a "black box", or not?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Sun, Apr 30, 2006 at 01:42:37PM +0300, Hannu Krosing wrote:
> > I do see the benefits with regard to simplified implementation, and
> > flexibility.
> > 
> > As a compromise, I could see either choice being correct. I don't
> > see either direction as being both user friendly and simple.
> 
> You can be user friendly and simple only if the user wants to do simple
> things, or if you can exactly predict what a user wants, else you have
> to grant some power to the user, and that involves complexity or at
> least a learning curve.

I think a big point that's being missed here is that SERIAL *is* trying
to be simple. If you need something more sophisticated or complex you
shouldn't be using SERIAL at all, you should be doing the stuff
yourself, by hand. 99% of the time people just need a nice, simple
autonumber field that behaves as expected. Namely, you don't have to
assign seperate permissions for it, and when you drop the table or
column, you don't end up with some other 'hidden' thing still hanging
around.

In other words, I think we should actually be moving towards #1, and
only allow 'tweaking under the hood' that makes good sense.
-- 
Jim C. Nasby, Sr. Engineering Consultant      jnasby@pervasive.com
Pervasive Software      http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461


В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Dawid Kuroczko"
Дата:
Сообщение: Re: Automatic free space map filling
Следующее
От: "Larry Rosenman"
Дата:
Сообщение: Re: Logging pg_autovacuum