postgresql/src
Michael Paquier 5226243459 Fix unexpected error messages for various flavors of ALTER TABLE
Some commands of ALTER TABLE could fail with the following error:
ERROR:  "tab" is of the wrong type

This error is unexpected, as all the code paths leading to
ATWrongRelkindError() should use a supported set of relkinds to generate
correct error messages.  This commit closes the gap with such mistakes,
by adding all the missing relkind combinations.  Tests are added to
check all the problems found.  Note that some combinations are not used,
but these are left around as it could have an impact on applications
relying on this code.

2ed532e has done a much larger refactoring on HEAD to make such error
messages easier to manage in the long-term, so nothing is needed there.

Author: Kyotaro Horiguchi
Reviewed-by: Peter Eisentraut, Ahsan Hadi, Michael Paquier
Discussion: https://postgr.es/m/20210216.181415.368926598204753659.horikyota.ntt@gmail.com
Backpatch-through: 11
2021-07-14 17:15:18 +09:00
..
backend Fix unexpected error messages for various flavors of ALTER TABLE 2021-07-14 17:15:18 +09:00
bin Don't depend on -fwrapv semantics in pgbench's random() function. 2021-06-28 12:40:37 -04:00
common Fix incautious handling of possibly-miscoded strings in client code. 2021-06-07 14:15:25 -04:00
fe_utils Fix incautious handling of possibly-miscoded strings in client code. 2021-06-07 14:15:25 -04:00
include Update configure's probe for libldap to work with OpenLDAP 2.5. 2021-07-09 12:38:55 -04:00
interfaces Don't use abort(3) in libpq's fe-print.c. 2021-06-28 14:17:42 -04:00
makefiles Remove libpq.rc, use win32ver.rc for libpq 2020-01-15 15:06:12 +01:00
pl Restore the portal-level snapshot for simple expressions, too. 2021-06-22 17:48:39 -04:00
port Add fallback implementation for setenv() 2021-06-01 09:27:25 +09:00
template Further tweaking of PG_SYSROOT heuristics for macOS. 2021-01-20 12:07:31 -05:00
test Fix unexpected error messages for various flavors of ALTER TABLE 2021-07-14 17:15:18 +09:00
timezone Update time zone data files to tzdata release 2021a. 2021-01-24 16:29:47 -05:00
tools Update configure's probe for libldap to work with OpenLDAP 2.5. 2021-07-09 12:38:55 -04:00
tutorial tutorial: land height is "elevation", not "altitude" 2021-03-10 20:25:18 -05:00
.gitignore
DEVELOPERS
Makefile Fix partial-build problems introduced by having more generated headers. 2018-04-09 16:42:10 -04:00
Makefile.global.in Fix prove_installcheck to use correct paths when used with PGXS 2021-07-01 08:46:38 -04:00
Makefile.shlib
nls-global.mk