Re: pg_dump and tsearch2 - Mailing list pgsql-general

From Tom Lane
Subject Re: pg_dump and tsearch2
Date
Msg-id 2755.1086617112@sss.pgh.pa.us
Whole thread Raw
In response to Re: pg_dump and tsearch2  (Michal Hlavac <hlavki@medium13.sk>)
List pgsql-general
Michal Hlavac <hlavki@medium13.sk> writes:
> sorry for my strictness. My problem is with type tsvector.
> It is because declaration of tsvector is after declaration of table with
> tsvector column...

Right.  This typically happens when you added a tsvector column to a
table that existed before the tsvector type was created.  7.4 and before
pg_dump tend to dump the objects in creation order and so have a
problem.  (CVS tip pg_dump is smarter, but I don't know if you can/want
to use it.)

What would probably work is to load the tsearch stuff into the new
database and then restore your dump.  You'll get errors when the script
tries to load the old tsearch objects, but you can ignore them.

If you're using pg_restore, another way is to make use of the feature
pg_restore has for manual control of the restore order.

            regards, tom lane

pgsql-general by date:

Previous
From: Richard Huxton
Date:
Subject: Re: Backup and Restore of PostgreSQL
Next
From: Együd Csaba
Date:
Subject: Re: pg_dump, bytea, dump order questions