Re: [ADMIN] postgresql server crash on windows 7 when using plpython
От | Craig Ringer |
---|---|
Тема | Re: [ADMIN] postgresql server crash on windows 7 when using plpython |
Дата | |
Msg-id | 4E422729.7000007@ringerc.id.au обсуждение исходный текст |
Ответ на | postgresql server crash on windows 7 when using plpython (c k <shreeseva.learning@gmail.com>) |
Ответы |
Re: [ADMIN] postgresql server crash on windows 7 when using plpython
|
Список | pgsql-general |
On 9/08/2011 10:54 PM, c k wrote: > Normal python functions returning text etc. are working but when conatining > > import sys > from uuid import getnode as get_mac > mac = get_mac() > return mac > > fails. What will be the reason? You still haven't supplied the error message you get when you run this. In the absence of better information, my guess would be that python's uuid module uses ossp-uuid, same as PostgreSQL does, but a different version or one compiled differently. The PostgreSQL `bin' dir with the postgresql version of the DLL will be in the path before the Python one, so Python is calling into a different version of the DLL than it expects and probably crashing as a result. That would be consistent with it working from the python command line. To work around this, I'd either use the ossp-uuid functions via the SPI rather than using the Python UUID module, or I'd remove the OSSP-UUID dll from the postgresql directory. You can certainly try that to see if it helps. This is one of the joys you get with Windows software not being managed by a central packaging system. Everyone bundles their own versions of all the dependencies, leaving messes like this where two DLLs with the same name aren't quite compatible. Yay! -- Craig Ringer
В списке pgsql-general по дате отправления: