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

From Alvaro Herrera
Subject Re: [PATCH] pg_dump: Sort overloaded functions in deterministic order
Date
Msg-id 20121017214350.GN5217@alvh.no-ip.org
Whole thread Raw
In response to Re: [PATCH] pg_dump: Sort overloaded functions in deterministic order  (Joel Jacobson <joel@trustly.com>)
Responses Re: [PATCH] pg_dump: Sort overloaded functions in deterministic order  (Joachim Wieland <joe@mcknight.de>)
Re: [PATCH] pg_dump: Sort overloaded functions in deterministic order  (Joel Jacobson <joel@trustly.com>)
List pgsql-hackers
Joel Jacobson wrote:
> On Thu, Jul 5, 2012 at 10:33 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> > You may in fact need a new field --- I'm just saying it should be in the
> > object-type-specific struct, eg FuncInfo, not DumpableObject.
>
>
> I suggest adding char *funcsig to FuncInfo, and moving the "funcsig =
> format_function_arguments(finfo, funciargs)" code from dumpFunc to getFuncs.
>
> Because dumpFunc is called after sortDumpableObjectsByTypeName, setting
> funcsig in the FuncInfo struct in dumpFunc would't work, as it needs to be
> available when entering sortDumpableObjectsByTypeName.

Uh, the patch you posted keeps the pg_get_function_identity_arguments
call in dumpFunc, but there is now also a new one in getFuncs.  Do we
need to remove the second one?

Here's an updated patch for your consideration.  I was about to push
this when I noticed the above.  The only change here is that the extra
code that tests for new remoteVersions in the second "else if" branch of
getFuncs and getAggregates has been removed, since it cannot ever be
reached.

(I tested the new pg_dump with 8.2 and HEAD and also verified it passes
pg_upgrade's "make check".  I didn't test with other server versions.)

--
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

Attachment

pgsql-hackers by date:

Previous
From: Christopher Browne
Date:
Subject: Re: [RFC] CREATE QUEUE (log-only table) for londiste/pgQ ccompatibility
Next
From: Daniel Farina
Date:
Subject: Re: Deprecating RULES