Re: Upgrade function problem - c language - Mailing list pgsql-novice

From Andrew McMillan
Subject Re: Upgrade function problem - c language
Date
Msg-id 1073692734.24884.741.camel@kant.mcmillan.net.nz
Whole thread Raw
In response to Upgrade function problem - c language  (Cath Lawrence <Cath.Lawrence@anu.edu.au>)
Responses Re: Upgrade function problem - c language
List 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 by date:

Previous
From: Bruno LEVEQUE
Date:
Subject: Re: createdb
Next
From: Tom Lane
Date:
Subject: Re: Upgrade function problem - c language