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
psql-serial-31.diff.gz
Description: Unix tar archive
---------------------------(end of broadcast)--------------------------- TIP 7: You can help support the PostgreSQL project by donating at http://www.postgresql.org/about/donate