On Tue, May 29, 2012 at 10:34:16PM -0400, Bruce Momjian wrote:
> My point is that plpython_call_handler is defined in the public and
> pg_catalog schema, as are other language handlers.
> 
> In fact, an argument could be made that the bug is really in pg_dump. 
> When we moved the language handlers into pg_catalog, I don't think any
> effort was made to suppress the public schema handlers from being dumped.
> Maybe that's where the fix should be.  It would allow us to fix all the
> languages, not just plpython when using pg_upgrade.  I think the big
> question is can we uniquely identify them.
> 
> I did see this C comment in pg_dump.c:
> 
>       /*
>        * Determine whether we want to dump definitions for procedural 
> languages.
>        * Since the languages themselves don't have schemas, we can't rely on
>        * the normal schema-based selection mechanism.  We choose to dump them
>        * whenever neither --schema nor --table was given.  (Before 8.1, we 
> used
>        * the dump flag of the PL's call handler function, but in 8.1 this will
>        * probably always be false since call handlers are created in 
> pg_catalog.)
>        *
>        * For some backwards compatibility with the older behavior, we forcibly
>        * dump a PL if its handler function (and validator if any) are in a
>        * dumpable namespace.  That case is not checked here.
>        *
>        * Also, if the PL belongs to an extension, we do not use this 
> heuristic.
>        * That case isn't checked here either.
>        */
>       static bool
>       shouldDumpProcLangs(void)

OK, so what do people want me to do on this?  Apply my pg_upgrade fix or
go for a more general fix that will prevent pg_dump from dumping out
these duplicate functions --- it would involve checking for public
schema functions who's names and probin match pg_pltemplate entries. 
Either will fix pg_upgrade.

-- 
  Bruce Momjian  <br...@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + It's impossible for everything to be true. +

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Reply via email to