Seems to be a bug in the bin/createdb script. I tried to use the script
as is and got the following error:
$ createlang plpgsql JC
ERROR: stat failed on file '$libdir/plpgsql': No such file or directory
createlang: language installation failed
But my PGLIB path is correct:
$ set | grep PG
PGDATA=/usr/local/pgsql/data
PGLIB=/usr/local/pgsql/lib
I editing bin/createdb, hard coding the value of PGLIB and createdb then
worked fine. The edits are given below.I don't know any shell scripting
or much about pg's internal so I have no idea why this problem occurs.
But I can see why createdb can't figure out by itself what the value of
PGLIB is.
The edits on bin/createlang:
189a190
> PGLIB=/usr/local/pgsql/lib
Hope this helps. And if it is not a bug but a problem with my
installation, configuration please let me know.
Jc