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

From Tom Lane
Subject Re: Upgrade function problem - c language
Date
Msg-id 4100.1073542496@sss.pgh.pa.us
Whole thread Raw
In response to Upgrade function problem - c language  (Cath Lawrence <Cath.Lawrence@anu.edu.au>)
List pgsql-novice
Cath Lawrence <Cath.Lawrence@anu.edu.au> writes:
> $pg_restore -O -d cbisdb SampleTableChange.tar
> pg_restore: [archiver (db)] could not execute query: ERROR:  permission
> denied for language c

> "language c"? never saw that before.

Apparently your dump contains some function definitions for C-language
functions.  You must run the dump script as a Postgres superuser to load
these definitions.

> and yet this does seem to be relevant, because if I try it as user
> postgres, 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

Best to drop and recreate the database before re-trying the restore,
else you'll get complaints about pre-existing objects.

            regards, tom lane

pgsql-novice by date:

Previous
From: Cath Lawrence
Date:
Subject: Upgrade function problem - c language
Next
From: Marcin Gil
Date:
Subject: pgsql 7.0 recovery to 7.4