Re: Unable to create or drop plpgsql

From: "Darko Prenosil" <Darko(dot)Prenosil(at)finteh(dot)hr>
To: "Jason Underdown" <jasonu(at)xmission(dot)com>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: Unable to create or drop plpgsql
Date: 2003-06-20 11:16:25
Message-ID: 004401c3371d$7b9a12a0$e996bfd5@darko
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


----- Original Message -----
From: "Jason Underdown" <jasonu(at)xmission(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Sent: Friday, June 20, 2003 11:00 PM
Subject: [GENERAL] Unable to create or drop plpgsql

> Hi everyone,
>
> This is my first post to this group, so please be kind.
>
> My database used to have support for plpgsql, that is I used the
createlang
> command line tool to add the language to the database and then added
> functions, and they worked. Since then I have moved the database to a new
> machine and a new directory (two separate moves). Now I can't drop the
> language nor create it! Here is the output when I try to run the
createlang
> and droplang commands.
>
I newer tried to move database on other machine that way, so I do not know
all the konsequences, but it looks to me that you created some kind of mess
with PGDATA and PGLIB directories. PGLIB directory should contain library
with plpgsql. I suggest you to connect to database with psql and try this :

DROP PROCEDURAL LANGUAGE 'plpgsql' CASCADE;

CREATE OR REPLACE FUNCTION plpgsql_call_handler() RETURNS LANGUAGE_HANDLER
AS 'PGLIB/plpgsql.so', 'plpgsql_call_handler' LANGUAGE 'c';

CREATE TRUSTED PROCEDURAL LANGUAGE 'plpgsql' HANDLER "plpgsql_call_handler"
LANCOMPILER 'PL/pgSQL';

where PGLIB is path to postgres libraryes.
If this fails, post back the error message, so we can see the exact reason
why CREATE LANGUAGE fails.

Regards !

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Hervé Piedvache 2003-06-20 11:18:13 Re: Strange trouble with pg_dump import
Previous Message Nigel J. Andrews 2003-06-20 11:07:01 debugging C functions