Re: postgres 9.5 create function plpthon3u resets connections to server

Поиск
Список
Период
Сортировка
От Peter Crosbie
Тема Re: postgres 9.5 create function plpthon3u resets connections to server
Дата
Msg-id CANsU3HgR7F2qu5nmU=ajov4k_XZJ+2rD-2eRBpzpm0dFeive1g@mail.gmail.com
обсуждение исходный текст
Ответ на Re: postgres 9.5 create function plpthon3u resets connections to server  (Adrian Klaver <adrian.klaver@aklaver.com>)
Ответы Re: postgres 9.5 create function plpthon3u resets connections to server  (Adrian Klaver <adrian.klaver@aklaver.com>)
Список pgsql-general
Adrian, many thanks for picking this up.

Going back to get the link for the installation download, I notice the "readme.txt" link next to the installer. Looking at that file for the first time, it clearly lays out how to include the language packs including plpython. After following the instructions in the readme.txt the plpython extension is working fine. No excuse for not reading the readme. My bad.

As you note in your response, I was not matching the required version of python. The bottom line is that postgresql does seem to be relatively sensitive to the particular distribution of python, not just version - (I had matched the versions postgres python distb 3.3.4 and anaconda 3.3.4.)

Setting the server's path to use C:\EnterpriseDB\LanguagePack\9.5\x64\Python-3.3 as described in the readme.txt on the download site was all that it took to get it working correctly.

Thanks again picking this up and getting me pointed in the right direction. 

For completeness, here are the answers to your specific questions.

Where did you get Postgres from and how did you install it?

postgresql-9.5.3-1-windows-x64.exe from here.

Can you show how you created the extension?

CREATE EXTENSION plpython3u;

The required version will be what ever plpythonu was built against when the binary was built. At a guess and given what you are seeing that is not the version in the Anaconda distribution.

Agreed and that is indeed the issue, as noted above in the fix.

What is the dependency walker output?

... snip

[  6] PLPYTHON3.DLL
     [ ? ] LIBINTL-8.DLL
     [ ? ] PYTHON33.DLL
     [ ? ] POSTGRES.EXE
     [  6] MSVCR120.DLL
          [ ^6] KERNEL32.DLL
               [F^6] NTDLL.DLL


В списке pgsql-general по дате отправления:

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: postgres 9.5 create function plpthon3u resets connections to server
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: postgres 9.5 create function plpthon3u resets connections to server