Re: Extensions support for pg_dump, patch v27

From: Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
To: Itagaki Takahiro <itagaki(dot)takahiro(at)gmail(dot)com>
Cc: "David E(dot) Wheeler" <david(at)kineticode(dot)com>, David Fetter <david(at)fetter(dot)org>, Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr>, PostgreSQL-Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Extensions support for pg_dump, patch v27
Date: 2011-01-26 10:18:45
Message-ID: 87aaiohssa.fsf@hi-media-techno.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Itagaki Takahiro <itagaki(dot)takahiro(at)gmail(dot)com> writes:
> Since pg_dump won't dump user objects in pg_catalog, adminpack can
> avoid the above errors by installing functions in pg_catalog.
> CREATE EXTENSION might have the same issue -- Can EXTENSION work
> without errors when we install extensions in template databases?

Well in fact the reason why pg_dump will not dump the extension when
it's installed in pg_catalog is that the pg_depend entry is not
recorded, and the SQL query pg_dump uses gets its data from pg_extension
JOIN pg_depend JOIN pg_namespace.

The missing entry in pg_depend is the reason why the extension is not
part of the dump. We could fix that using a LEFT JOIN here and COALESCE
to force the namespace as pg_catalog. Is that not a kludge? If
acceptable, I will do that next.

Regards,
--
Dimitri Fontaine
http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2011-01-26 10:59:18 Re: log_checkpoints and restartpoint
Previous Message YAMAMOTO Takashi 2011-01-26 09:56:37 systable_getnext_ordered