Thread

  1. [PATCH] pg_dump: Sort overloaded functions in deterministic order

    Joel Jacobson <joel@trustly.com> — 2012-07-04T15:17:26Z

    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?