pg_dump and using schema problem

From: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>
To: Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: pg_dump and using schema problem
Date: 2005-05-18 18:34:00
Message-ID: Pine.GSO.4.62.0505182221590.10926@ra.sai.msu.su
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi there,

I got a problem playing with schema and dump/restore process (8.0.3).
I created schema 'contrib' for my database and added it to search_path
in postgresql.conf. Then I loaded a bunch of modules to 'contrib schema' and
populated database with various tables. Everything is ok, I could dump
separately schema 'contrib' and 'public' separately and I didn't expected
any problem in restore. Unfortunately, pg_dump explicitly defines
search path to 'public, pg_catalog' and any objects from 'contrib' schema
doesn't seen, which cause many errors, for example, table uses type tsvector,
which defined in tsearch2 module, so that table doesn't created.
I have to use sed to add 'contrib' module to search_path to restore
my database, but I don't like such solution.

Is't possible to say pg_dump/pg_dumpall to use custom search_path or get it
from postgresql.conf ?

Regards,
Oleg
_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: oleg(at)sai(dot)msu(dot)su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2005-05-18 19:36:32 Re: pg_dump and using schema problem
Previous Message Lamar Owen 2005-05-18 18:27:44 Re: Learning curves and such (was Re: pgFoundry)