简而言之,我的问题是“为什么$libdir不能在我的Psql安装上工作”.
原文链接:https://www.f2er.com/postgresql/191702.htmlCREATE FUNCTION st_Box2d_in(cstring) RETURNS Box2d AS '$libdir/liblwgeom','Box2DFLOAT4_in' LANGUAGE c IMMUTABLE STRICT;
产生错误
could not access file "$libdir/liblwgeom": No such file or directory
而
CREATE FUNCTION st_Box2d_in(cstring) RETURNS Box2d AS '/usr/local/pgsql/lib/liblwgeom','Box2DFLOAT4_in' LANGUAGE c IMMUTABLE STRICT;
正常工作
的输出
% pg_config --pkglibdir /usr/local/pgsql/lib
似乎是正确的.