postgresql/src/test/regress
Tom Lane b5b0db19b8 Fix handling of extended statistics during ALTER COLUMN TYPE.
ALTER COLUMN TYPE on a column used by a statistics object fails since
commit 928c4de30, because the relevant switch in ATExecAlterColumnType
is unprepared for columns to have dependencies from OCLASS_STATISTIC_EXT
objects.

Although the existing types of extended statistics don't actually need us
to do any work for a column type change, it seems completely indefensible
that that assumption is hidden behind the failure of an unrelated module
to contain any code for the case.  Hence, create and call an API function
in statscmds.c where the assumption can be explained, and where we could
add code to deal with the problem when it inevitably becomes real.

Also, the reason this wasn't handled before, neither for extended stats
nor for the last half-dozen new OCLASS kinds :-(, is that the default:
in that switch suppresses compiler warnings, allowing people to miss the
need to consider it when adding an OCLASS.  We don't really need a default
because surely getObjectClass should only return valid values of the enum;
so remove it, and add the missed OCLASS entries where they should be.

Discussion: https://postgr.es/m/20170512221010.nglatgt5azzdxjlj@alvherre.pgsql
2017-05-14 12:22:25 -04:00
..
data Improve key representation for GIN jsonb_ops, and fix existence-search bug. 2014-05-09 08:41:26 -04:00
expected Fix handling of extended statistics during ALTER COLUMN TYPE. 2017-05-14 12:22:25 -04:00
input Remove support for version-0 calling conventions. 2017-03-30 06:25:46 -07:00
output Remove support for version-0 calling conventions. 2017-03-30 06:25:46 -07:00
sql Fix handling of extended statistics during ALTER COLUMN TYPE. 2017-05-14 12:22:25 -04:00
.gitignore Update .gitignore for config.cache. 2014-12-18 19:56:42 +09:00
GNUmakefile Remove ICU tests from default run 2017-03-25 00:30:26 -04:00
Makefile
parallel_schedule Identity columns 2017-04-06 08:41:37 -04:00
pg_regress_main.c Fix inclusions of postgres_fe.h from .h files. 2017-03-08 20:41:06 -05:00
pg_regress.c Force the regression databases to have bytea_output set to hex 2017-03-20 18:12:24 -04:00
pg_regress.h Fix inclusions of postgres_fe.h from .h files. 2017-03-08 20:41:06 -05:00
README Don't generate plain-text HISTORY and src/test/regress/README anymore. 2014-02-10 20:48:04 -05:00
regress.c Improve 64bit atomics support. 2017-04-07 14:48:11 -07:00
regressplans.sh Rename 'gmake' to 'make' in docs and recommended commands 2014-02-12 17:29:19 -05:00
resultmap Enable compiling with the mingw-w64 32 bit compiler. 2011-12-10 15:35:41 -05:00
serial_schedule Identity columns 2017-04-06 08:41:37 -04:00
standby_schedule Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00

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