Re: proposal: PL/Pythonu - function ereport

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Catalin Iacob <iacobcatalin(at)gmail(dot)com>, Craig Ringer <craig(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: proposal: PL/Pythonu - function ereport
Date: 2015-11-29 08:18:58
Message-ID: CAFj8pRAgTTgd5ModOaX-pyMQ1o-4Zb+vO+uQ4sZu85MGZNCnTg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi

2015-11-16 23:40 GMT+01:00 Peter Eisentraut <peter_e(at)gmx(dot)net>:

> On 11/15/15 11:29 PM, Pavel Stehule wrote:
> >
> >
> > 2015-11-16 5:20 GMT+01:00 Peter Eisentraut <peter_e(at)gmx(dot)net
> > <mailto:peter_e(at)gmx(dot)net>>:
> >
> > I don't think it's right to reuse SPIError for this. SPIError is
> > clearly meant to signal an error in the SPI calls. Of course, we
> can't
> > stop users from raising whatever exception they want, but if we're
> going
> > to advertise that users can raise exceptions, then we should create
> > separate exception classes.
> >
> > I suppose the proper way to set this up would be to create a base
> class
> > like plpy.Error and derive SPIError from that.
> >
> >
> > Do you have some ideas about the name of this class?
>
> I think plpy.Error is fine.
>
>
here is updated patch - work with 2.x Python.

I have 3.x Python broken on my fedora, so I should not do tests on 3.x.

Regards

Pavel

Attachment Content-Type Size
plpythonu-spierror-keyword-params-09.patch text/x-patch 22.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2015-11-29 10:01:46 Re: Using quicksort for every external sort run
Previous Message Pavel Stehule 2015-11-29 07:00:58 Re: proposal: PL/Pythonu - function ereport