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

From: "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>
To: Svenne Krap <svenne(at)krap(dot)dk>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: Is a SERIAL column a "black box", or not?
Date: 2006-05-01 21:36:48
Message-ID: 20060501213647.GH97354@pervasive.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)pervasive(dot)com
Pervasive Software http://pervasive.com work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim C. Nasby 2006-05-01 21:40:52 Re: Is a SERIAL column a "black box", or not?
Previous Message Larry Rosenman 2006-05-01 21:14:04 Re: [HACKERS] Logging pg_autovacuum