Re: Upgrade function problem - c language

Поиск
Список
Период
Сортировка
От Andrew McMillan
Тема Re: Upgrade function problem - c language
Дата
Msg-id 1073692734.24884.741.camel@kant.mcmillan.net.nz
обсуждение исходный текст
Ответ на Upgrade function problem - c language  (Cath Lawrence <Cath.Lawrence@anu.edu.au>)
Ответы Re: Upgrade function problem - c language  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-novice
On Thu, 2004-01-08 at 14:05, Cath Lawrence wrote:
>  me,and yet this does seem to be relevant, because if I try it as
> userpostgres, I get a different error:
> pg_restore -O -d cbisdb SampleTableChange.tar
> pg_restore: [archiver (db)] could not execute query: ERROR:
> function"plpgsql_call_handler" already exists with same argument types

Hi Cath,

I see this all the time doing restores.

I think there are some situations (on Debian, at least) where pl/pgsql
gets added to the template1 database.  Once that happens you will always
have to do a "DROP LANGUAGE plpgsql CASCADE" after creating the database
and before restoring your dump.

PL/PgSQL is a bit awkward in this way - it's not sure whether it's a
standard component or not.  Certainly every database I have ever
designed has it there, so from that point of view having it in the
template1 is useful.  On the other hand it means that you always run
into this problem during restore...

If you only ever restore into this installation then you maybe want to
drop the language from the template1 database as well.

Ultimately some sort of a flag on pg_restore to "don't try and restore
languages" would be a good enhancement, I guess.

Regards,
                    Andrew McMillan

-------------------------------------------------------------------------
Andrew @ Catalyst .Net .NZ  Ltd,  PO Box 11-053,  Manners St,  Wellington
WEB: http://catalyst.net.nz/             PHYS: Level 2, 150-154 Willis St
DDI: +64(4)916-7201       MOB: +64(21)635-694      OFFICE: +64(4)499-2267
               http://survey.net.nz/ - any more questions?
-------------------------------------------------------------------------

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

Предыдущее
От: Bruno LEVEQUE
Дата:
Сообщение: Re: createdb
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Upgrade function problem - c language