pg_restore and user defined types, several other pg_restore problems - Mailing list pgsql-hackers

From Mario Weilguni
Subject pg_restore and user defined types, several other pg_restore problems
Date
Msg-id 200208161150.57544.mweilguni@sime.com
Whole thread Raw
Responses Re: pg_restore and user defined types, several other  (Oleg Bartunov <oleg@sai.msu.su>)
Re: pg_restore and user defined types, several other pg_restore problems  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Hi,

I'm using the ltree module and located several problems, I think not all problems are really ltree related but might be
apg_dump/pg_restore problem. 

Here are the problems I've encountered:
* pg_restore tries to create a table with ltree and ltree[] datatypes before the type itself is created, so it fails.
* several functions are already defined in template1, so "create database " will restore these functions. pg_restore
willtry to restore those functions as well and fails. Maybe "create or replace function" can be used here? I'm willing
todo this if it's ok. 
* I've gist indices on ltree[] columns, and when pg_restore tries to restore it it will report: pg_restore: [archiver
(db)]could not execute query: ERROR:  data type ltree[] has no default operator class for access method "gist"
Youmust specify an operator class for the index or define a         default operator class for the data type 
 It seems those extra functions for index support are not restored. Removing the commit/end from ltree.sql and running
itagain (will report a lot of errors, but a few inserts as well) will make this work again. However it requires a lot
ofDBA assistance to restore. 

All other problems are solvable by using "pg_restore -L" and using a modified archiv index, but IMO this should work
outof the box. 

Best regards,Mario Weilguni


pgsql-hackers by date:

Previous
From: Teodor Sigaev
Date:
Subject: Re: tsearch bug in 7.2.1?
Next
From: Oleg Bartunov
Date:
Subject: Re: pg_restore and user defined types, several other