Tom Lane írta:
> Zoltan Boszormenyi <zb@cybertec.at> writes:
>
>> Tom Lane írta:
>>
>>>> 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.
>>
>
> Really? How is pg_dump going to deal with that?
>
> regards, tom lane
>
It emits ALTER TABLE ... SET GENERATED AS IDENTITY
after ALTER SEQUENCE OWNED BY and if any of the
columns is IDENTITY or GENERATED then it emits
COPY OVERRIDING SYSTEM VALUE in my patch already.
--
----------------------------------
Zoltán Böszörményi
Cybertec Geschwinde & Schönig GmbH
http://www.postgresql.at/