我在PostgreSQL中得到这个异常:
org.postgresql.util.PSQLException: ERROR: could not access file "$libdir/plpgsql": No such file or directory
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1721)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1489)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:193)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:452)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:337)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:236)
at org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:205)
Run Code Online (Sandbox Code Playgroud)
我搜索了很多,大多数解决方案指向错误的安装.但这是我的测试数据库,它已经运行了很长时间没有问题.插入工作也正常.问题仅发生在选定查询上.
显然,您将PostgreSQL lib目录移到了原位.要确认这一点,请在psql中尝试以下操作:
> SET client_encoding TO iso88591;
ERROR: could not access file "$libdir/utf8_and_iso8859_1": No such file or directory
Run Code Online (Sandbox Code Playgroud)
如果你收到这样的错误信息,那么我的理论是正确的.您需要找出这些文件的最终位置,或者您可以重新安装PostgreSQL来恢复它们.
要找出$libdir所指的内容,请运行以下命令:
pg_config --pkglibdir
Run Code Online (Sandbox Code Playgroud)
对我来说,这会产生:
/usr/lib/postgresql
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
9849 次 |
| 最近记录: |