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

From Jim C. Nasby
Subject Re: Is a SERIAL column a "black box", or not?
Date
Msg-id 20060501210441.GG97354@pervasive.com
Whole thread Raw
In response to Re: Is a SERIAL column a "black box", or not?  (Hannu Krosing <hannu@skype.net>)
Responses Re: Is a SERIAL column a "black box", or not?
List 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 by date:

Previous
From: "Dawid Kuroczko"
Date:
Subject: Re: Automatic free space map filling
Next
From: "Larry Rosenman"
Date:
Subject: Re: Logging pg_autovacuum