Reputation: 1
I am trying to run a python script within a trigger in mi PostgreSQL 15 database in Windows 10.
I've already tried the solution proposed in the following link 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%22python37.,that%20you%20have%20admin%20rights.
I am still stucked in STEP 5. Every time I try to create the function I got the error message.
I've checked the installation notes and in theory it needs Python 3.9
However, for some reason it looks like I need to copy in System 32 the file: python310.dll because any other version wouldn't accept this instruction:
CREATE EXTENSION plpython3u;
In any case, I've downloaded and tried with all these Python 10 versions and it doesn't work. enter image description here
Does anybody know how to by pass the situation?
Thanks in advance.
I've tried to follow several links. The one it got me furthest was:
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%22python37.,that%20you%20have%20admin%20rights.
Upvotes: 0
Views: 1002
Reputation: 51
I had exactly the same issue, but found a solution. You should install python 3.10.0, for all users (important), be sure to have python and python/Scripts in the path (before PG bin path), restart PG service and it should be ok.
Upvotes: 1