]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Stabilize pg_dump output order for similarly-named triggers and policies.
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 4 Nov 2019 21:25:05 +0000 (16:25 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 4 Nov 2019 21:25:05 +0000 (16:25 -0500)
commit078f5bc8e307fd13ea256e8c37d22aaddc846211
tree91b02532dff8c4a09124a82058ddabbf91fb0582
parent0782050bc22d4d428c3cffe0d0a7ecee29d2f5fe
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
src/bin/pg_dump/pg_dump_sort.c