postgresql/src/bin
Tom Lane 07b39083c2 Fix pg_dump's handling of dependencies for custom opclasses.
Since pg_dump doesn't treat the member operators and functions of operator
classes/families (that is, the pg_amop and pg_amproc entries, not the
underlying operators/functions) as separate dumpable objects, it missed
their dependency information.  I think this was safe when the code was
designed, because the default object sorting rule emits operators and
functions before opclasses, and there were no dependency types that could
mess that up.  However, the introduction of range types in 9.2 broke it:
now a type can have a dependency on an opclass, allowing dependency rules
to push the opclass before the type and hence before custom operators.
Lacking any information showing that it shouldn't do so, pg_dump emitted
the objects in the wrong order.

Fix by teaching getDependencies() to translate pg_depend entries for
pg_amop/amproc rows to look like dependencies for their parent opfamily.

I added a regression test for this in HEAD/v12, but not further back;
life is too short to fight with 002_pg_dump.pl.

Per bug #15934 from Tom Gottfried.  Back-patch to all supported branches.

Discussion: https://postgr.es/m/15934-58b8c8ab7a09ea15@postgresql.org
2019-07-31 15:42:49 -04:00
..
initdb Fix inconsistencies and typos in the tree 2019-07-29 12:28:30 +09:00
pg_archivecleanup Translation updates 2019-06-17 15:30:20 +02:00
pg_basebackup Handle fsync failures in pg_receivewal and pg_recvlogical 2019-07-29 07:54:57 +02:00
pg_checksums Message style improvements 2019-07-09 15:47:09 +02:00
pg_config Translation updates 2019-06-17 15:30:20 +02:00
pg_controldata Fix inconsistencies and typos in the tree 2019-07-29 12:28:30 +09:00
pg_ctl Fix inconsistencies and typos in the tree 2019-07-29 12:28:30 +09:00
pg_dump Fix pg_dump's handling of dependencies for custom opclasses. 2019-07-31 15:42:49 -04:00
pg_resetwal Fix failures to ignore \r when reading Windows-style newlines. 2019-07-25 12:11:17 -04:00
pg_rewind Print WAL position correctly in pg_rewind error message. 2019-07-30 21:14:14 +03:00
pg_test_fsync Translation updates 2019-06-17 15:30:20 +02:00
pg_test_timing Unwind some workarounds for lack of portable int64 format specifier 2019-07-04 17:01:43 +02:00
pg_upgrade Fix inconsistencies and typos in the tree 2019-07-29 12:28:30 +09:00
pg_waldump Translation updates 2019-06-17 15:30:20 +02:00
pgbench Don't assume expr is available in pgbench tests 2019-07-24 11:41:39 -04:00
pgevent Fix inconsistencies and typos in the tree 2019-07-29 12:28:30 +09:00
psql Fix failures to ignore \r when reading Windows-style newlines. 2019-07-25 12:11:17 -04:00
scripts Fix memory leak coming from simple lists built in reindexdb 2019-07-30 10:54:48 +09:00
Makefile Rename pg_verify_checksums to pg_checksums 2019-03-13 10:43:20 +09:00