From: | Craig Ringer <ringerc(at)ringerc(dot)id(dot)au> |
---|---|
To: | c k <shreeseva(dot)learning(at)gmail(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org, pgsql-admin <pgsql-admin(at)postgresql(dot)org> |
Subject: | Re: postgresql server crash on windows 7 when using plpython |
Date: | 2011-08-10 06:37:29 |
Message-ID: | 4E422729.7000007@ringerc.id.au |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin 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
From | Date | Subject | |
---|---|---|---|
Next Message | c k | 2011-08-10 07:23:09 | Re: postgresql server crash on windows 7 when using plpython |
Previous Message | Craig Ringer | 2011-08-10 06:19:49 | Re: Character set equivalent for AL32UTF8 |
From | Date | Subject | |
---|---|---|---|
Next Message | Tomas Vondra | 2011-08-10 07:18:26 | Re: Postgres on SSD |
Previous Message | c k | 2011-08-10 05:13:17 | Re: [GENERAL] postgresql server crash on windows 7 when using plpython |