Re: [PATCH] pg_dump: Sort overloaded functions in deterministic order

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Joel Jacobson <joel(at)trustly(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, Joachim Wieland <joe(at)mcknight(dot)de>
Subject: Re: [PATCH] pg_dump: Sort overloaded functions in deterministic order
Date: 2012-10-18 15:26:33
Message-ID: 20121018152633.GF1982@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Joel Jacobson wrote:
> On Wed, Oct 17, 2012 at 11:43 PM, Alvaro Herrera
> <alvherre(at)2ndquadrant(dot)com> wrote:
> > 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?
>
> It could be done, but unfortunately we cannot use the value computed
> in dumpFunc(),
> because getFuncs() is called before dumpFunc().

Right, I got that from the discussion.

> What could be done is to keep the changes in getFuncs(), and also
> change dumpFunc()
> to use the value computed in getFuncs(), but I think the gain is small
> in relation
> to the complexity of changing dumpFunc(), as we would still need to
> make the two other
> function calls in the SQL query in dumpFunc() to pg_get_function_arguments() and
> pg_get_function_result().

Changing pg_dump is complex enough whatever the change, yes. I have not
touched this.

> > 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.
>
> Looks really good.

Thanks, pushed it.

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2012-10-18 15:29:52 Re: Review for pg_dump: Sort overloaded functions in deterministic order
Previous Message Peter Geoghegan 2012-10-18 15:25:57 Re: [RFC][PATCH] wal decoding, attempt #2 - Design Documents (really attached)