Re: IDENTITY/GENERATED v36 Re: Final version of IDENTITY/GENERATED patch
От | Zoltan Boszormenyi |
---|---|
Тема | Re: IDENTITY/GENERATED v36 Re: Final version of IDENTITY/GENERATED patch |
Дата | |
Msg-id | 4613FDF4.50400@cybertec.at обсуждение исходный текст |
Ответ на | Re: IDENTITY/GENERATED v36 Re: Final version of IDENTITY/GENERATED patch (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: IDENTITY/GENERATED v36 Re: Final version of IDENTITY/GENERATED patch
|
Список | pgsql-patches |
Tom Lane írta: > Zoltan Boszormenyi <zb@cybertec.at> writes: > >> So, I should allow DROP DEFAULT, implement >> SET DEFAULT GENERATED ALWAYS AS >> and modify the catalog so the GENERATED property >> is part of pg_attrdef. >> > > Sounds good. > > >> What about IDENTITY? >> Should it also be part of pg_attrdef? There are two ways >> to implement it: have or don't have a notion of it. >> The latter would treat GENERATED BY DEFAULT AS IDENTITY >> the same as SERIAL. >> > > Is there any good reason to distinguish the two? > Yes. Plain SERIALs can be updated with given values whereas IDENTITY columns cannot. And there is the difference between GENERATED and GENERATED IDENTITY: GENERATED columns can updated with DEFAULT values, IDENTITY columns cannot. I strictly have to distinguish IDENTITY from both GENERATED and plain SERIALs. > regards, tom lane > -- ---------------------------------- Zoltán Böszörményi Cybertec Geschwinde & Schönig GmbH http://www.postgresql.at/
В списке pgsql-patches по дате отправления: