pgsql: Stabilize pg_dump output order for similarly-named triggers and - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Stabilize pg_dump output order for similarly-named triggers and
Date
Msg-id E1iRjqs-0003vF-1W@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Stabilize pg_dump output order for similarly-named triggers and policies.

The code only compared two triggers' names and namespaces (the latter
being the owning table's schema).  This could result in falling back
to an OID-based sort of similarly-named triggers on different tables.
We prefer to avoid that, so add a comparison of the table names too.
(The sort order is thus table namespace, trigger name, table name,
which is a bit odd, but it doesn't seem worth contorting the code
to work around that.)

Likewise for policy objects, in 9.5 and up.

Complaint and fix by Benjie Gillam.  Back-patch to all supported
branches.

Discussion: https://postgr.es/m/CAMThMzEEt2mvBbPgCaZ1Ap1N-moGn=Edxmadddjq89WG4NpPtQ@mail.gmail.com

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/ee8b95f2684a2af9a4c3b78b345e01cba2ef31ce

Modified Files
--------------
src/bin/pg_dump/pg_dump_sort.c | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Stabilize pg_dump output order for similarly-named triggers and
Next
From: Michael Paquier
Date:
Subject: pgsql: Refactor code building relation options