IDENTITY/GENERATED v31 - Mailing list pgsql-patches

From Zoltan Boszormenyi
Subject IDENTITY/GENERATED v31
Date
Msg-id 45E21A6C.3090404@dunaweb.hu
Whole thread Raw
In response to New version of IDENTITY/GENERATED  (Zoltan Boszormenyi <zboszor@dunaweb.hu>)
List pgsql-patches
Hi,

here comes the next version. Changes:
* Implemented ALTER TABLE ... DROP IDENTITY
  and SET GENERATED { ALWAYS | BY DEFAULT } AS IDENTITY
* Extended documentation and testcase for the above.
* pg_dump now dumps the proper ALTER for such columns.
   Reintroduced the pg_dump feature to dump
   OVERRIDING SYSTEM VALUE for INSERT and
   COPY statements if the table schema contains any
   GENERATED ALWAYS column.
* There can be only one IDENTITY column in a table at any time.
  This is checked on CREATE, ALTER TABLE ADD and
  ALTER TABLE SET ... IDENTITY and required for SQL:2003
  compliance.
* On update, the GENERATED columns' late generation
  of DEFAULT value is also implemented. The GENERATED
  ALWAYS AS ( expr ) still only deals within the same
  limits as regular DEFAULT.
* Implemented a check so CHECK constraints cannot
  reference IDENTITY/GENERATED columns.
  It is checked on CREATE AND ALTER TABLE
  ADD CONSTRAINT and ALTER TABLE ADD COLUMN.
  It makes sense because IDENTITY and GENERATED
  columns has to be assigned after all other columns were
  assigned with values and validated via constraints.

I hereby declare the IDENTITY part feature complete.
Please review.

Best regards,
Zoltán Böszörményi


Attachment

pgsql-patches by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: Small patch to compile on IRIX 6.5 with gcc
Next
From: Matteo Beccati
Date:
Subject: Re: Small patch to compile on IRIX 6.5 with gcc