Re: [HACKERS] SERIAL type isn't listed...?
От | Thomas Lockhart |
---|---|
Тема | Re: [HACKERS] SERIAL type isn't listed...? |
Дата | |
Msg-id | 3899AD73.1C31C1A6@alumni.caltech.edu обсуждение исходный текст |
Ответ на | SERIAL type isn't listed...? (The Hermit Hacker <scrappy@hub.org>) |
Список | pgsql-hackers |
> Shouldn't this produce something? Was talking with Dave Page today about > the lack of a serial type in PgAdmin, and he mentioned that its not a > listed type? Right. That's because the SERIAL type is a parser kludge rather than a full-fledged type. At the moment, a column defined as SERIAL becomes, in the parser backend, a defined sequence (CREATE SEQUENCE ...) and an INT4 column with a constraint of DEFAULT ... which refers to the sequence just created. There are downsides to this: the implicit SEQUENCE is not cleaned up if the column is destroyed; explicit reference to SERIAL is lost during dump/restore; the implicit stuff just leads to confusion, etc etc etc. Perhaps eventually it should become a type on its own, directly accessing the same structures as Vadim's "sequence" code. Or perhaps it could be done using the SPI interface. - Thomas -- Thomas Lockhart lockhart@alumni.caltech.edu South Pasadena, California
В списке pgsql-hackers по дате отправления: