windows PostgreSQL 15 + Python 3.10+ plpython3u:'psql:server意外关闭了连接,' + '应用程序已丢失数据库连接,'

rta7y2nd  于 2023-03-31  发布在  Windows
关注(0)|答案(1)|浏览(276)

我试图在Windows 10中的mi PostgreSQL 15数据库中的触发器内运行Python脚本。
我已经尝试了以下链接中提出的解决方案https://stackoverflow.com/questions/67852675/postgresql-13-python-3-7-9-plpython 3u-psql-server-closed-the-connection-u#:~:text= ERROR%3A%20server%20closed%20the%20connection,or%20while%20processing%20the%20request.&text =The%20application%20has%20lost%20the%20database%20connection.,-(which%20is%20a&text=1-,and%20copy%20%22python37.,that%20you%20%20%20admin%20rights.
我仍然被困在第5步。每次我试图创建函数时,我都会得到错误信息。
我已经检查了安装说明,理论上它需要Python 3.9
enter image description here
但是,由于某种原因,我需要在System 32中复制该文件:python310.dll,因为任何其他版本都不接受此指令:

CREATE EXTENSION plpython3u;

无论如何,我已经下载并尝试了所有这些Python 10版本,它都不起作用。
有谁知道如何绕过这种局面吗?
先谢谢你了。
我试着去看了几个链接。其中最让我印象深刻的一个是:
https://stackoverflow.com/questions/67852675/postgresql-13-python-3-7-9-plpython3u-psql-server-closed-the-connection-u#:~:text= ERROR%3A%20server%20closed%20the%20connection,or%20while%20processing%20the%20request.&text =The%20application%20has%20lost%20the%20database%20connection.,-(which%20is%20a&text=1-,and%20copy%20%22adminpython37.,that%20you%20have%20have%20rights.

klr1opcd

klr1opcd1#

我有完全相同的问题,但找到了解决方案.你应该安装python 3. 10. 0,为所有用户(重要),一定要有python和python/脚本在路径(之前PG bin路径),重新启动PG服务,它应该是好的.

相关问题