Re: can't load plpython - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: can't load plpython
Date
Msg-id 20090331171420.GY23023@alvh.no-ip.org
Whole thread Raw
In response to Re: can't load plpython  (Euler Taveira de Oliveira <euler@timbira.com>)
Responses Re: can't load plpython  (Euler Taveira de Oliveira <euler@timbira.com>)
List pgsql-hackers
Euler Taveira de Oliveira wrote:
> Tom Lane escreveu:
> > Alvaro Herrera <alvherre@commandprompt.com> writes:
> >> ... However, on HEAD this is crashing for me, and it's right when plpython
> >> loads.  Backtrace below.
> > 
> > Does plpython pass its regression tests for you (I'd suppose not)?
> > 
> > For me on Fedora 10 x86_64, CVS HEAD plus python 2.5.2 passes regression
> > but the given example still dumps core.  postmaster log says
> > 
> > postgres: tgl regression [local] SELECT: Objects/stringobject.c:107: PyString_FromString: Assertion `str != ((void
*)0)'failed.
 
> > LOG:  server process (PID 4714) was terminated by signal 6: Aborted
> > LOG:  terminating any other active server processes
> > 
> PyString_FromString() [1] fails to return something useful, i.e, null pointer
> when  its argument is null.  The trivial fix (that is attached) is to ensure
> that we don't pass a null pointer as the second argument of
> PyDict_SetItemString(). Of course, it's a Python bug and I filled it [3].

I'm not sure I'm reading this right, but isn't this preventing a
plpytHon function to work if parameters don't have names assigned?
i.e. apparently I can't just use args[0].  I'm sure I'm wrong on this ...?

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Solaris getopt_long and PostgreSQL
Next
From: Josh Berkus
Date:
Subject: Re: Partitioning feature ...