Fix ALTER TABLE error message
authorÁlvaro Herrera <[email protected]>
Tue, 4 Mar 2025 19:07:30 +0000 (20:07 +0100)
committerÁlvaro Herrera <[email protected]>
Tue, 4 Mar 2025 19:07:30 +0000 (20:07 +0100)
commit931a1c0237901c68e6d57227fb1368178665c794
tree32b4e07a1a64d48c48fe85f06e30b80cbb0fcdb9
parentc75c830e23929141b80b0f13612f2796254bd27d
Fix ALTER TABLE error message

This bogus error message was introduced in 2013 by commit f177cbfe676d,
because of misunderstanding the processCASbits() API; at the time, no
test cases were added that would be affected by this change.  Only in
ca87c415e2fc was one added (along with a couple of typos), with an XXX
note that the error message was bogus.  Fix the whole, add some test
cases.

Backpatch all the way back.

Reviewed-by: Nathan Bossart <[email protected]>
Discussion: https://postgr.es/m/202503041822[email protected]
src/backend/parser/gram.y
src/test/regress/expected/foreign_key.out
src/test/regress/sql/foreign_key.sql