aboutsummaryrefslogtreecommitdiff
path: root/src/tutorial/funcs.source
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2019-09-25 17:30:42 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2019-09-25 17:30:42 -0400
commitb81a9c2fc52509025c635fa08ecaec1bad21441b (patch)
tree96cc5584df388970831b548ffdc455d695a6fd2b /src/tutorial/funcs.source
parentbffe1bd68457e43925c362d8728ce3b25bdf1c94 (diff)
downloadpostgresql-b81a9c2fc52509025c635fa08ecaec1bad21441b.tar.gz
postgresql-b81a9c2fc52509025c635fa08ecaec1bad21441b.zip
Fix handling of GENERATED columns in CREATE TABLE LIKE INCLUDING DEFAULTS.
LIKE INCLUDING DEFAULTS tried to copy the attrdef expression without copying the state of the attgenerated column. This is in fact wrong, because GENERATED and DEFAULT expressions are not the same kind of animal; one can contain Vars and the other not. We *must* copy attgenerated when we're copying the attrdef expression. Rearrange the if-tests so that the expression is copied only when the correct one of INCLUDING DEFAULTS and INCLUDING GENERATED has been specified. Per private report from Manuel Rigger. Tom Lane and Peter Eisentraut
Diffstat (limited to 'src/tutorial/funcs.source')
0 files changed, 0 insertions, 0 deletions