Re: Upgrade function problem - c language

From: Andrew McMillan <andrew(at)catalyst(dot)net(dot)nz>
To: Cath Lawrence <Cath(dot)Lawrence(at)anu(dot)edu(dot)au>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Upgrade function problem - c language
Date: 2004-01-09 23:58:55
Message-ID: 1073692734.24884.741.camel@kant.mcmillan.net.nz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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?
-------------------------------------------------------------------------

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2004-01-10 00:11:31 Re: Upgrade function problem - c language
Previous Message Bruno LEVEQUE 2004-01-09 22:49:54 Re: createdb