[PATCH] pg_dump: Sort overloaded functions in deterministic order

From: Joel Jacobson <joel(at)trustly(dot)com>
To: pgsql-hackers(at)postgresql(dot)org, Joel Jacobson <joel(at)trustly(dot)com>
Subject: [PATCH] pg_dump: Sort overloaded functions in deterministic order
Date: 2012-07-04 16:44:54
Message-ID: CAASwCXf9x67DsTp_N44N8L1q7LiyTJeHoKK-8DT0ykYr+J-CaA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I renamed the new element to DumpableObject from "proargs" to the more
general name "sortkey".

This way this element can be used by any object types in the future,
which might require sorting by additional information than type, namespace
and name.

Currently, it's only set for functions/aggregates though, its NULL for all
other object types.

I felt less ugly to add a new element with a general name than one specific
for functions.

I also moved the check to the last part of DOTypeNameCompare, just before
sorting by OIDs as a last resort.

Feedback on the implementation is welcomed.

If this can be achieved without adding a new element to DumpableObject,
it is of course much better, but I couldn't find a way of doing that.

Attachment Content-Type Size
pg_dump_deterministic_order_v2.patch application/octet-stream 20.2 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Boszormenyi Zoltan 2012-07-04 16:58:44 Re: [PATCH] lock_timeout and common SIGALRM framework
Previous Message Alvaro Herrera 2012-07-04 15:34:14 Re: enhanced error fields