"Thomas Borg Salling" <tbs@navicon.dk> writes:
> for some reason - conversion_create.sql the $libdir is not defined. I tried
> to print $libdir from bin/initdb, but this variable is empty.
$libdir is not an environment variable, it's a notation specially
recognized by CREATE FUNCTION. It should expand to the same directory
printed by "pg_config --pkglibdir". You might check what that prints.
The only other idea that comes to mind is that you changed your mind
about the install prefix during the installation and didn't do a full
rebuild. The PKGLIBDIR setting is hardwired into dfmgr.o at compile
time and maybe it didn't get recompiled.
regards, tom lane