Re: plpython improvements

From: "Sven Suursoho" <sven(at)spam(dot)pri(dot)ee>
To: "Bruce Momjian" <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: plpython improvements
Date: 2006-05-07 09:36:59
Message-ID: op.s86czxf6plgmb3@localhost
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Sat, 06 May 2006 20:38:48 +0300, Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>:

> I still do not know why we can't do some kind of runtime test in python
> and disable this feature for 2.4 builds that have debugging enabled.
> Can we do a dynamic function load test from plpython? There must be
> some function that is only visible in debug builds.

Yes, I already did research last week after discussions about that. In
unmodified Python distribution, in configure:
if --with-pydebug
define Py_DEBUG
undef NDEBUG
else
undef Py_DEBUG
define NDEBUG
fi

Unfortunately, this is not case for Fedora Core 4, where assertions are
used unconditionally. And to make things worse, there is no runtime symbol
at all to indicate whether Python is compiled with debugging/assertions
enabled (Py_DEBUG & NDEBUG are preprocessor symbols)

I see 3 options (from best to worst, IMHO)
1) document misbehaviour when using Python2.4 with assertions allowed with
reference to bug fix.
2) new configure flag to optionally allow/disallow using generator
3) drop generators

Btw, we developed returning compose types further. Basically did same as
for SETOF functions -- allow to return any Python object that conforms to
mapping protocol. Currently only dict as previously, though. But still,
ready for new fancy unforeseen Python features without recompiling PG.
Additionally, now it is possible to return compose types as Python tuples.
Will create patch whenever final decision is made about generators.

--
Sven Suursoho

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Sven Suursoho 2006-05-07 09:42:57 Re: plpython improvements
Previous Message Bruce Momjian 2006-05-07 01:44:44 Re: pgstat: remove delayed destroy / pipe: