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 | 20060501213647.GH97354@pervasive.com обсуждение исходный текст |
Ответ на | Re: Is a SERIAL column a "black box", or not? (Svenne Krap <svenne@krap.dk>) |
Ответы |
Re: Is a SERIAL column a "black box", or not?
|
Список | 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 по дате отправления: