Problem with restoring a 7.1 dump

Started by Christopher Kings-Lynneover 23 years ago3 messages
#1Christopher Kings-Lynne
chriskl@familyhealth.com.au

Hi all,

I'm having problems restoring a dump. I get this:

You are now connected as new user chriskl.
ERROR: Unrecognized language specified in a CREATE FUNCTION: 'plpgsql'.
Pre-installed languages are SQL, C, and internal.
Additional languages may be installed using 'createlang'.
ERROR: Unrecognized language specified in a CREATE FUNCTION: 'plpgsql'.
Pre-installed languages are SQL, C, and internal.
Additional languages may be installed using 'createlang'.

I've done a "createlang plpgsql template1" before starting my restore, but I
just cannot get it to recognise the language.

The dump format is the complete one that first tries to drop each database
and then recreates it from scratch, so each of my databases is being dropped
and then totally recreated.

How do I get this to work?

Chris

In reply to: Christopher Kings-Lynne (#1)
Re: Problem with restoring a 7.1 dump

Christopher Kings-Lynne <chriskl@familyhealth.com.au> wrote:
[snap]

How do I get this to work?

Chris

I think i did this:

CREATE FUNCTION "plpgsql_call_handler" () RETURNS opaque AS
'/usr/local/pgsql/lib/plpgsql.so', 'plpgsql_call_handler' LANGUAGE 'C';
CREATE TRUSTED PROCEDURAL LANGUAGE 'plpgsql' HANDLER
"plpgsql_call_handler" LANCOMPILER 'PL/pgSQL';

This might be in the docs also.
Try it :)

Regards,
Magnus

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Christopher Kings-Lynne (#1)
Re: Problem with restoring a 7.1 dump

"Christopher Kings-Lynne" <chriskl@familyhealth.com.au> writes:

ERROR: Unrecognized language specified in a CREATE FUNCTION: 'plpgsql'.
Pre-installed languages are SQL, C, and internal.
Additional languages may be installed using 'createlang'.

I've done a "createlang plpgsql template1" before starting my restore, but I
just cannot get it to recognise the language.

Are you sure you did that (and it worked)? I don't see how a definition
in template1 would not propagate to new databases.

The dump format is the complete one that first tries to drop each database
and then recreates it from scratch, so each of my databases is being dropped
and then totally recreated.

Hm ... is the script also trying to drop individual elements in each
database? If so I wonder if it's actually dropping the plpgsql language
(or at least the handler for it) and then failing to recreate it for
some reason. But that failure would provoke an error, too.

regards, tom lane