PostgreSql+ Python+ Windows 10
在Postgres中,我尝试使用语言plpython3u执行任何查询,就像:
CREATE OR REPLACE FUNCTION func(
file_name character varying)
RETURNS text AS
$BODY$
return "aa"
$BODY$
LANGUAGE plpython3u VOLATILE
COST 100;
之后,服务器崩溃了以下错误:
该应用程序丢失了数据库连接:⁃如果连接空闲,则可能已被强行断开连接。 ⁃应用程序服务器或数据库服务器可能已重新启动。 ⁃用户会话可能已经计时了。您想继续建立新的会议吗?
我在Postgres日志中查看以下错误:
致命的Python错误:Initfsencoding:无法加载文件系统codec modulenotfoundError:no no模块名为“编码”当前线程0x00001E44(最新呼叫首先):2022-07-07-06 21:25 21:25 21:25 :06.113 msk [6000] chomk (PID 3592)可以
搜索主题上的主题,确实创建了扩展名plpython3u; 并设置环境变量,但没有任何改变。 我不明白问题是什么,安装了Python 3.7(根据Postgres11文档)
In Postgres I try to execute any query with LANGUAGE plpython3u like:
CREATE OR REPLACE FUNCTION func(
file_name character varying)
RETURNS text AS
$BODY$
return "aa"
$BODY$
LANGUAGE plpython3u VOLATILE
COST 100;
after that the server crashes with the following error:
The application has lost the database connection: ⁃ If the connection was idle it may have been forcibly disconnected. ⁃ The application server or database server may have been restarted. ⁃ The user session may have timed out. Do you want to continue and establish a new session?
I looked in the Postgres logs for the following error:
Fatal Python error: initfsencoding: unable to load the file system codec ModuleNotFoundError: No module named 'encodings' Current thread 0x00001e44 (most recent call first): 2022-07-06 21:25:06.113 MSK [6000] СООБЩЕНИЕ: процесс сервера (PID 3592) был прерван исключением 0xC0000409
Googled on topics, did CREATE EXTENSION plpython3u;
and set up environment variables, but nothing changes.
I don’t understand what the problem is, Python 3.7 is installed (according to Postgres11 documentation)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论