Re: problem with restore of functions

Поиск
Список
Период
Сортировка
От Thomas T. Thai
Тема Re: problem with restore of functions
Дата
Msg-id Pine.NEB.4.43.0203030143480.1138-100000@ns01.minnesota.com
обсуждение исходный текст
Ответ на Re: problem with restore of functions  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Fri, 22 Feb 2002, Tom Lane wrote:

> Oleg Bartunov <oleg@sai.msu.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.





В списке pgsql-hackers по дате отправления:

Предыдущее
От: Neil Conway
Дата:
Сообщение: new hashing function
Следующее
От: Michael Meskes
Дата:
Сообщение: Re: Oracle vs PostgreSQL in real life : NEWS!!!