Re: Extensions support for pg_dump, patch v27

Поиск
Список
Период
Сортировка
От Itagaki Takahiro
Тема Re: Extensions support for pg_dump, patch v27
Дата
Msg-id AANLkTi=AysNSqcUF6pC4Ft5vMdEKiV+MWHJ_9PCD-8xi@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Extensions support for pg_dump, patch v27  (Dimitri Fontaine <dimitri@2ndQuadrant.fr>)
Ответы Re: Extensions support for pg_dump, patch v27  (Dimitri Fontaine <dimitri@2ndQuadrant.fr>)
Список 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


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

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: COPYRIGHT vs psql \copyright
Следующее
От: Hiroshi Inoue
Дата:
Сообщение: setlocale and gettext in Postgres