Re: createlang doesn't work - Mailing list pgsql-novice

From Tom Lane
Subject Re: createlang doesn't work
Date
Msg-id 21014.1088868272@sss.pgh.pa.us
Whole thread Raw
In response to createlang doesn't work  (R.Welz <linuxprodukte@gmx.de>)
List pgsql-novice
"R.Welz" <linuxprodukte@gmx.de> writes:
> What do I have to do to install plpgsql ?

How exactly did you build and install Postgres?  Ordinarily this
should "just work", but it appears that you either do not have
plpgsql.so at all, or it's installed in the wrong place, or possibly
it's there but refers to other shared libraries that aren't there
(which would suggest that you're trying to use a plpgsql.so that
is built for a different platform).

> I tried as root:
> /usr/local/pgsql/bin/createlang plpgsql test

You should not be root for this, you should be the postgres superuser.
It's really not a good idea to use root for tasks that don't need it.

> to enable plpgsql in database test, but I always get the message:
> language installation failed: ERROR: could not access file
> "$libdir/plpgsql": File or dir not found.

$libdir here refers to the directory printed by "pg_config --pkglibdir",
and despite the lack of any .so extension on the name, postgres will
try it with .so appended (or .sl or whatever shared-library extension
your platform uses).

            regards, tom lane

pgsql-novice by date:

Previous
From: R.Welz
Date:
Subject: createlang doesn't work
Next
From: R.Welz
Date:
Subject: Re: createlang doesn't work