[PATCH] pg_dump: Sort overloaded functions in deterministic order - Mailing list pgsql-hackers

From Joel Jacobson
Subject [PATCH] pg_dump: Sort overloaded functions in deterministic order
Date
Msg-id CAASwCXcKgiYdCj-YO2+VkRm55mkn=r4aeYWn1AWp2GPSkGtppw@mail.gmail.com
Whole thread Raw
List pgsql-hackers
I have received positive feedback on the pg_dump --split option I suggested,
but it depends on pg_dump dumping objects in a deterministic order.

I'm committed to fixing this. The first problem I've spotted is overloaded
functions.

This patch adds a new element to DumpableObject: char *proargs
This is set to the output from pg_get_function_identity_arguments(oid)
for all functions, and set to NULL for all other objects.

sortDumpableObjectsByTypeName calls DOTypeNameCompare, which in addition
to sorting objects by type, namespace and name, now also sorts by
the function identity arguments.

This makes overloaded functions being dumped in the same order,
regardless of which order they were created.

Are there any other object types where the order isn't deterministic?

Attachment

pgsql-hackers by date:

Previous
From: Dimitri Fontaine
Date:
Subject: Re: Event Triggers reduced, v1
Next
From: Magnus Hagander
Date:
Subject: Re: pgfoundry references in docs