Re: IDENTITY/GENERATED v36 Re: Final version of IDENTITY/GENERATED patch - Mailing list pgsql-patches

From Zoltan Boszormenyi
Subject Re: IDENTITY/GENERATED v36 Re: Final version of IDENTITY/GENERATED patch
Date
Msg-id 4613FDF4.50400@cybertec.at
Whole thread Raw
In response to Re: IDENTITY/GENERATED v36 Re: Final version of IDENTITY/GENERATED patch  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: IDENTITY/GENERATED v36 Re: Final version of IDENTITY/GENERATED patch  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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 by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: build/install xml2 when configured with libxml
Next
From: Andrew Dunstan
Date:
Subject: Re: build/install xml2 when configured with libxml