Re: [HACKERS] exceptions not present in plpy with Python 3

2011-01-21 Thread Peter Eisentraut
On tor, 2011-01-20 at 22:30 +0200, Peter Eisentraut wrote: > On lör, 2010-12-18 at 18:56 +0100, Jan Urbański wrote: > > there seems to be a problem in the way we add exceptions to the plpy > > module in PL/Python compiled with Python 3k. > > > > Try this: DO $$ plpy.SPIError $$ language plpython3u

Re: [HACKERS] exceptions not present in plpy with Python 3

2011-01-20 Thread Peter Eisentraut
On lör, 2010-12-18 at 18:56 +0100, Jan Urbański wrote: > there seems to be a problem in the way we add exceptions to the plpy > module in PL/Python compiled with Python 3k. > > Try this: DO $$ plpy.SPIError $$ language plpython3u; > > I'm not a Python 3 expert, but I nicked some code from the Int

Re: [HACKERS] exceptions not present in plpy with Python 3

2010-12-18 Thread Jan Urbański
On 18/12/10 18:56, Jan Urbański wrote: > I'm not a Python 3 expert, but I nicked some code from the Internet and > came up with this patch (passes regression tests on both Python 2 and 3). I tried to be too cute with the regression test, it fails with Python 2.3.7 (the latest 2.3 release). Attach

[HACKERS] exceptions not present in plpy with Python 3

2010-12-18 Thread Jan Urbański
Hi, there seems to be a problem in the way we add exceptions to the plpy module in PL/Python compiled with Python 3k. Try this: DO $$ plpy.SPIError $$ language plpython3u; I'm not a Python 3 expert, but I nicked some code from the Internet and came up with this patch (passes regression tests on