postgresql/src/test/regress
Alvaro Herrera efd9366dce Fix droppability of constraints upon partition detach
We were failing to set conislocal correctly for constraints in
partitions after partition detach, leading to those constraints becoming
undroppable.  Fix by setting the flag correctly.  Existing databases
might contain constraints with the conislocal wrongly set to false, for
partitions that were detached; this situation should be fixable by
applying an UPDATE on pg_constraint to set conislocal true.  This
problem should otherwise be innocuous and should disappear across a
dump/restore or pg_upgrade.

Secondarily, when constraint drop was attempted in a partitioned table,
ATExecDropConstraint would try to recurse to partitions after doing
performDeletion() of the constraint in the partitioned table itself; but
since the constraint in the partitions are dropped by the initial call
of performDeletion() (because of following dependencies), the recursion
step would fail since it would not find the constraint, causing the
whole operation to fail.  Fix by preventing recursion.

Reported-by: Amit Langote
Diagnosed-by: Amit Langote
Author: Amit Langote, Álvaro Herrera
Discussion: https://postgr.es/m/f2b8ead5-4131-d5a8-8016-2ea0a31250af@lab.ntt.co.jp
2019-01-24 14:09:56 -03:00
..
data
expected Fix droppability of constraints upon partition detach 2019-01-24 14:09:56 -03:00
input Fix tablespace handling for partitioned tables 2018-12-17 15:37:40 -03:00
output Fix tablespace handling for partitioned tables 2018-12-17 15:37:40 -03:00
sql Fix droppability of constraints upon partition detach 2019-01-24 14:09:56 -03:00
.gitignore Update .gitignore for config.cache. 2014-12-18 19:56:42 +09:00
GNUmakefile Update copyright for 2019 2019-01-02 12:44:25 -05:00
Makefile Fix non-GNU makefiles for AIX make. 2017-11-30 00:57:22 -08:00
parallel_schedule
pg_regress_main.c Update copyright for 2019 2019-01-02 12:44:25 -05:00
pg_regress.c Replace @postgresql.org with @lists.postgresql.org for mailinglists 2019-01-19 19:06:35 +01:00
pg_regress.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
README
regress.c Update copyright for 2019 2019-01-02 12:44:25 -05:00
regressplans.sh
resultmap Make float exponent output on Windows look the same as elsewhere. 2018-10-12 11:14:27 -04:00
serial_schedule
standby_schedule

Documentation concerning how to run these regression tests and interpret
the results can be found in the PostgreSQL manual, in the chapter
"Regression Tests".