Re: [GENERAL] postgresql server crash on windows 7 when using plpython

From: c k <shreeseva(dot)learning(at)gmail(dot)com>
To: Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org, pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Re: [GENERAL] postgresql server crash on windows 7 when using plpython
Date: 2011-08-10 05:13:17
Message-ID: CAN2Y=uNbpzZ=z_KHBOwf_4qcOuZNp+PrPYMaF7qvQ_Wi7YOJLA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-general

Here is the actual function.
create or replace function software.python_test() returns text as
$body$
import sys
from uuid import getnode as get_mac
mac = get_mac()
return mac
$body$
language plpythonu volatile security definer;

When running the same code from python prompt, it run correctly without any
error.

Chaitanya Kulkarni
On Wed, Aug 10, 2011 at 12:57 AM, Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>wrote:

>
>
> On Tue, Aug 9, 2011 at 7:54 AM, c k <shreeseva(dot)learning(at)gmail(dot)com> wrote:
>
>> Dear Friends,
>> For client requirements, I am testing postgresql 9.0.4 on windows 7 with
>> plpython. First I installed python 2.7 and then added python installation
>> path to windows PATH variable. Then installed postgresql from one-click
>> installer. Server started and every thing was ok. Then I go to create
>> plpythonu in a database. But it failed. After searching, I found that it
>> needs python 2.6. So I again installed python 2.6 and then dropped plpython
>> from database and created again. It was successful. 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?
>>
>
> What would be the error message(s)?
>
> The actual function code would also be helpful, to put things into context.
>
>
>>
>> Advance thanks for your help.
>>
>> Chaitanya Kulkarni
>>
>
>
>
> --
> Adrian Klaver
> adrian(dot)klaver(at)gmail(dot)com
>

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Craig Ringer 2011-08-10 06:05:56 Re: Fwd: Suspected Postgres Datacorruption
Previous Message Adrian Klaver 2011-08-09 19:27:46 Re: [GENERAL] postgresql server crash on windows 7 when using plpython

Browse pgsql-general by date

  From Date Subject
Next Message Craig Ringer 2011-08-10 06:37:29 Re: postgresql server crash on windows 7 when using plpython
Previous Message tamanna madaan 2011-08-10 05:07:05 canceling autovacuum task error