postgresql/src
Michael Paquier e4fca461ab Include ALTER INDEX SET STATISTICS in pg_dump
The new grammar pattern of ALTER INDEX SET STATISTICS able to use column
numbers on top of the existing column names introduced by commit 5b6d13e
forgot to add support for the feature in pg_dump, so defining statistics
on index columns was missing from the dumps, potentially causing silent
planning problems with a subsequent restore.

pg_dump ought to not use column names in what it generates as these are
automatically generated by the server and could conflict with real
relation attributes with matching patterns.  "expr" and "exprN", N
incremented automatically after the creation of the first one, are used
as default attribute names for index expressions, and that could easily
match what is defined in other relations, causing the dumps to fail if
some of those attributes are renamed at some point.  So to avoid any
problems, the new grammar with column numbers gets used.

Reported-by: Ronan Dunklau
Author: Michael Paquier
Reviewed-by: Tom Lane, Adrien Nayrat, Amul Sul
Discussion: https://postgr.es/m/CAARsnT3UQ4V=yDNW468w8RqHfYiY9mpn2r_c5UkBJ97NAApUEw@mail.gmail.com
Backpatch-through: 11, where the new syntax has been introduced.
2018-12-18 09:28:16 +09:00
..
backend Fix tablespace handling for partitioned tables 2018-12-17 15:37:40 -03:00
bin Include ALTER INDEX SET STATISTICS in pg_dump 2018-12-18 09:28:16 +09:00
common Modernize our code for looking up descriptive strings for Unix signals. 2018-12-16 19:38:57 -05:00
fe_utils Fix translation of special characters in psql's LaTeX output modes. 2018-11-26 17:32:51 -05:00
include Drop support for getting signal descriptions from sys_siglist[]. 2018-12-17 13:50:16 -05:00
interfaces In PQprint(), write HTML table trailer before closing the output pipe. 2018-12-07 13:11:30 -05:00
makefiles Add PGXS options to control TAP and isolation tests, take two 2018-12-03 09:27:35 +09:00
pl Drop no-op CoerceToDomain nodes from expressions at planning time. 2018-12-13 13:24:43 -05:00
port Drop support for getting signal descriptions from sys_siglist[]. 2018-12-17 13:50:16 -05:00
template Yet further rethinking of build changes for macOS Mojave. 2018-11-02 18:54:00 -04:00
test Fix tablespace handling for partitioned tables 2018-12-17 15:37:40 -03:00
timezone Sync our copy of the timezone library with IANA release tzcode2018g. 2018-10-31 09:47:53 -04:00
tools Create a separate oid range for oids assigned by genbki.pl. 2018-12-13 14:50:57 -08:00
tutorial Deduplicate "invalid input syntax" messages for various types. 2018-07-22 14:58:01 -07:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
DEVELOPERS Replace a couple of references to files that no longer exist in the source 2009-05-04 08:08:47 +00:00
Makefile Fix partial-build problems introduced by having more generated headers. 2018-04-09 16:42:10 -04:00
Makefile.global.in Remove useless symbol from Makefile.global. 2018-11-06 10:57:51 -05:00
Makefile.shlib Ensure static libraries have correct mod time even if ranlib messes it up. 2018-11-29 15:53:44 -05:00
nls-global.mk nls-global.mk: search build dir for source files, too 2016-06-07 18:55:18 -04:00