aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/functions.c
diff options
context:
space:
mode:
authorAlvaro Herrera <alvherre@alvh.no-ip.org>2017-01-09 19:26:58 -0300
committerAlvaro Herrera <alvherre@alvh.no-ip.org>2017-01-09 19:26:58 -0300
commit4d4ab6ccd8a24a91ef9fc1904f0e80a2fd0377fe (patch)
tree8477c1f314b0793db356de7d9fb03ea8f9927d66 /src/backend/executor/functions.c
parented8e8b8149220809881d7a275104621fddc36289 (diff)
downloadpostgresql-4d4ab6ccd8a24a91ef9fc1904f0e80a2fd0377fe.tar.gz
postgresql-4d4ab6ccd8a24a91ef9fc1904f0e80a2fd0377fe.zip
Fix ALTER TABLE / SET TYPE for irregular inheritance
If inherited tables don't have exactly the same schema, the USING clause in an ALTER TABLE / SET DATA TYPE misbehaves when applied to the children tables since commit 9550e8348b79. Starting with that commit, the attribute numbers in the USING expression are fixed during parse analysis. This can lead to bogus errors being reported during execution, such as: ERROR: attribute 2 has wrong type DETAIL: Table has type smallint, but query expects integer. Since it wouldn't do to revert to the original coding, we now apply a transformation to map the attribute numbers to the correct ones for each child. Reported by Justin Pryzby Analysis by Tom Lane; patch by me. Discussion: https://postgr.es/m/20170102225618.GA10071@telsasoft.com
Diffstat (limited to 'src/backend/executor/functions.c')
0 files changed, 0 insertions, 0 deletions