Fix ALTER TABLE error message
authorÁlvaro Herrera <alvherre@alvh.no-ip.org>
Tue, 4 Mar 2025 19:07:30 +0000 (20:07 +0100)
committerÁlvaro Herrera <alvherre@alvh.no-ip.org>
Tue, 4 Mar 2025 19:07:30 +0000 (20:07 +0100)
commit9ea5fe5b6c80f9522d2d819592f796d40294d83e
tree2c5792a4880664dee51417349c307584605177d2
parentedc3bccd0dc79f874bd10ed6206aed7028df6fcf
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 <nathandbossart@gmail.com>
Discussion: http://postgr.es/m/202503041822.aobpqke3igvb@alvherre.pgsql
src/backend/parser/gram.y
src/test/regress/expected/foreign_key.out
src/test/regress/sql/foreign_key.sql