Re: problem with restore of functions

From: "Thomas T(dot) Thai" <tom(at)minnesota(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: problem with restore of functions
Date: 2002-03-03 07:49:44
Message-ID: Pine.NEB.4.43.0203030143480.1138-100000@ns01.minnesota.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, 22 Feb 2002, Tom Lane wrote:

> Oleg Bartunov <oleg(at)sai(dot)msu(dot)su> writes:
> > Sorry, I meant when we use contrib module, for example 'tsearch',
> > it creates functions, defines op_classes for 'gist_txtidx_ops',
> > which use OID of that functions.
> > pg_dump doesn't dumps op_clasess and it's impossible to use pg_restore.
>
> So the real gripe is that pg_dump doesn't dump user-defined opclasses.
> That's a fair complaint. Submit a patch ;-)

the only way i got around this was to:

pg_dump -f filename dbname

then either load all those user defined opclasses in template1, then
create the db where it will automatically create all those templates. or
create the dbname and load in those opclasses (tsearch.sql) etc.

then do restore (not with pg_restore) but with:

psql -f filename dbname (remember to create the db and make sure the
user functions are loaded first)

there will be errors about function blah blah already existing, in
addition to the db already existing. but your db should be ok.

not the most elegant or fastest way, but that's the only way i found it to
work. i couldn't find away to use pg_dump -Fc... and pg_restore :(

--
Thomas T. Thai
Minnesota.com, Inc.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Meskes 2002-03-03 08:51:41 Re: Oracle vs PostgreSQL in real life : NEWS!!!
Previous Message Neil Conway 2002-03-03 06:02:51 new hashing function