Re: proposal: PL/Pythonu - function ereport

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Catalin Iacob <iacobcatalin(at)gmail(dot)com>
Cc: Craig Ringer <craig(at)2ndquadrant(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: proposal: PL/Pythonu - function ereport
Date: 2015-11-07 18:03:14
Message-ID: CAFj8pRCy9idz6L=MePaQFuEeYLpeR3q9cXsgepnvaXWuqq-GbA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2015-11-05 7:24 GMT+01:00 Catalin Iacob <iacobcatalin(at)gmail(dot)com>:

> On Wed, Nov 4, 2015 at 10:12 AM, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
> wrote:
> > It helped me lot of, thank you
>
> Welcome, I learned quite some from the process as well.
>
> >>
> >>
> >> There's just the doc part left then.
> >
> >
> > done
>
> We're almost there but not quite.
>
> There's still a typo in the docs: excation.
>
> A plpy.SPIError can be raised should be A
> <literal>plpy.SPIError</literal> can be raised right?
>
>
fixed

> And most importantly, for Python 3.5 there is a plpython_error_5.out
> which is needed because of an alternative exception message in that
> version. You didn't update this file, this makes the tests fail on
> Python3.5.
>

this fix will be pretty hard - if I'll fix for 3.5, then any other will be
broken

I can move these tests to separate file and run some tests for 3.5 and
other for older. But it is pretty ugly - and we have not any similar
workaround elsewhere.

I checked the diff and looks so only language identifiers are different

7c7
< +$$ LANGUAGE plpython3u;
---
> +$$ LANGUAGE plpythonu;
26c26
< +$$ LANGUAGE plpython3u;
---
> +$$ LANGUAGE plpythonu;
43c43
< +$$ LANGUAGE plpython3u;
---
> +$$ LANGUAGE plpythonu;
52c52
< +$$ LANGUAGE plpython3u;
---
> +$$ LANGUAGE plpythonu;
60c60
< +$$ LANGUAGE plpython3u;
---
> +$$ LANGUAGE plpythonu;

It is strange - I cannot to understand how is possible so other Python's
tests are working in your comp. I don't know where is the core of this
issue, but I am inclined to think so some wrong is in your environment. The
identifier plpython3u shouldn't be used in tests.

Regards

Pavel

> Since you might not have Python 3.5 easily available I've attached a
> patch to plpython_error_5.out which makes the tests pass, you can fold
> this into your patch.
>

Attachment Content-Type Size
plpythonu-spierror-keyword-params-06.patch text/x-patch 16.6 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Kevin Grittner 2015-11-07 18:26:34 Re: pgsql: Modify tqueue infrastructure to support transient record types.
Previous Message Tom Lane 2015-11-07 17:44:30 Re: Minor regexp bug