postgresql/src/include/nodes
Peter Eisentraut 533c5d8bdd Fix application of identity values in some cases
Investigation of 2d2d06b7e2 revealed that
identity values were not applied in some further cases, including
logical replication subscribers, VALUES RTEs, and ALTER TABLE ... ADD
COLUMN.  To fix all that, apply the identity column expression in
build_column_default() instead of repeating the same logic at each call
site.

For ALTER TABLE ... ADD COLUMN ... IDENTITY, the previous coding
completely ignored that existing rows for the new column should have
values filled in from the identity sequence.  The coding using
build_column_default() fails for this because the sequence ownership
isn't registered until after ALTER TABLE, and we can't do it before
because we don't have the column in the catalog yet.  So we specially
remember in ColumnDef the sequence name that we decided on and build a
custom NextValueExpr using that.

Reviewed-by: Michael Paquier <michael.paquier@gmail.com>
2018-02-02 14:39:10 -05:00
..
bitmapset.h Improve the heuristic for ordering child paths of a parallel append. 2018-01-09 13:07:52 -05:00
execnodes.h Support parallel btree index builds. 2018-02-02 13:32:44 -05:00
extensible.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
lockoptions.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
makefuncs.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
memnodes.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
nodeFuncs.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
nodes.h Transaction control in PL procedures 2018-01-22 08:43:06 -05:00
params.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
parsenodes.h Fix application of identity values in some cases 2018-02-02 14:39:10 -05:00
pg_list.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
plannodes.h Allow UPDATE to move rows between partitions. 2018-01-19 15:33:06 -05:00
primnodes.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
print.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
readfuncs.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
relation.h Allow UPDATE to move rows between partitions. 2018-01-19 15:33:06 -05:00
replnodes.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
tidbitmap.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
value.h Update copyright for 2018 2018-01-02 23:30:12 -05:00