Elielson Fontanezi <ElielsonF@prodam.sp.gov.br> writes:
> postgres$ createlang plpgsql template1
> ERROR: stat failed on file '$libdir/plpgsql': No such file or directory
> createlang: language installation failed
> Why of this error?
Well, do you have a plpgsql.so in your libdir?
If you're not sure where libdir points to, ask pg_config:
$ pg_config --pkglibdir
// should get some path or other
then look to see what's in that directory.
If you don't see plpgsql.so, then you have an incomplete installation,
or perhaps plpgsql.so was put in the wrong place. If you do see it then
there's some kind of dynamic-linking problem --- looking in the
postmaster's stderr log may help you find out what.
regards, tom lane