Re: Extensions support for pg_dump, patch v27
Itagaki Takahiro <itagaki.takahiro@gmail.com>
From: Itagaki Takahiro <itagaki.takahiro@gmail.com>
To: Dimitri Fontaine <dimitri@2ndquadrant.fr>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, "David E. Wheeler" <david@kineticode.com>, David Fetter <david@fetter.org>, PostgreSQL-Hackers <pgsql-hackers@postgresql.org>, Dave Page <dpage@postgresql.org>, Guillaume Lelarge <guillaume@lelarge.info>
Date: 2011-01-27T12:02:15Z
Lists: pgsql-hackers
On Thu, Jan 27, 2011 at 20:01, Dimitri Fontaine <dimitri@2ndquadrant.fr> wrote: > Ok, done. Of course, it solves the whole problem Itagaki had with > adminpack because we stop relying on dependencies to get it right now. I found pg_restore with -c option fails when an extension is created in pg_catalog. Since pg_catalog is an implicit search target, so we might need the catalog to search_path explicitly. Note that I can restore adminpack with not errors because it has explicit "pg_catalog." prefix in the installer script. ---- postgres=# CREATE EXTENSION cube WITH SCHEMA pg_catalog; $ pg_dump -Fc postgres > postgres.dump $ pg_restore -d postgres -c postgres.dump pg_restore: [archiver (db)] Error while PROCESSING TOC: pg_restore: [archiver (db)] Error from TOC entry 1; 3996 16678 EXTENSION cube pg_restore: [archiver (db)] could not execute query: ERROR: no schema has been selected to create in ---- BTW, I have a minor comments for the code. extern bool extension_relocatable_p(Oid ext_oid); What is "_p" ? Also, we could make the function static because it is used only in extension.c. -- Itagaki Takahiro