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

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: [PATCH] pg_dump: Sort overloaded functions in deterministic order
Дата
Msg-id 20121017214350.GN5217@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: [PATCH] pg_dump: Sort overloaded functions in deterministic order  (Joel Jacobson <joel@trustly.com>)
Ответы Re: [PATCH] pg_dump: Sort overloaded functions in deterministic order
Re: [PATCH] pg_dump: Sort overloaded functions in deterministic order
Список 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

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Christopher Browne
Дата:
Сообщение: Re: [RFC] CREATE QUEUE (log-only table) for londiste/pgQ ccompatibility
Следующее
От: Daniel Farina
Дата:
Сообщение: Re: Deprecating RULES