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

From Tom Lane
Subject Re: pg_restore and user defined types, several other pg_restore problems
Date
Msg-id 7185.1029505912@sss.pgh.pa.us
Whole thread Raw
In response to pg_restore and user defined types, several other pg_restore problems  (Mario Weilguni <mweilguni@sime.com>)
Responses Re: pg_restore and user defined types, several other pg_restore problems  (Mario Weilguni <mweilguni@sime.com>)
List pgsql-hackers
Mario Weilguni <mweilguni@sime.com> writes:
> 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.

Odd; what are the OIDs of the table and the datatypes?

> * 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?

No.  Use pg_restore per the documentation: make an empty database for it
to restore into (by cloning template0 instead of template1).

>   pg_restore: [archiver (db)] could not execute query: ERROR:  data type ltree[] has no default operator class for
accessmethod "gist"
 
>           You must specify an operator class for the index or define a
>           default operator class for the data type

Are you using recent sources?  As of two weeks or so ago, pg_dump should
know how to dump operator classes.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Open 7.3 items
Next
From: Jan Wieck
Date:
Subject: Re: Coding help