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