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)
commit4e026be5f15994a7036eaca172126226e053f655
treec4de9077f9b9eae67566a345879c87eef9a0cd79
parent56e6a3186885c726bbbff89eaec0b2fa077d0a9a
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