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 20060501213647.GH97354@pervasive.com
Whole thread Raw
In response to Re: Is a SERIAL column a "black box", or not?  (Svenne Krap <svenne@krap.dk>)
Responses Re: Is a SERIAL column a "black box", or not?
List pgsql-hackers
On Sun, Apr 30, 2006 at 11:45:14AM +0200, Svenne Krap wrote:
> Tom Lane wrote:
> >In short, I think there's a reasonably good case to be made for losing the
> >hidden dependency and re-adopting the viewpoint that saying SERIAL is
> >*exactly* the same as making a sequence and then making a default
> >expression that uses the sequence.  Nothing behind the curtain.
> >  
> I speak more as a user than a hacker, but I do still lurk here ;)
> 
> The way sequences are handled is imho one of the strongest features. The 
> possiblity to query nextval is bordering on divine.

Sure, but there's no reason that would couldn't allow that with a true
black-box SERIAL, either. In  fact, you can do it today if you want,
just by creating a wrapper around nextval(pg_get_serial_sequence()).
-- 
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: "Larry Rosenman"
Date:
Subject: Re: Logging pg_autovacuum
Next
From: "Jim C. Nasby"
Date:
Subject: Re: Is a SERIAL column a "black box", or not?