Re: proposal: PL/Pythonu - function ereport - Mailing list pgsql-hackers

From Pavel Stehule
Subject Re: proposal: PL/Pythonu - function ereport
Date
Msg-id CAFj8pRAgTTgd5ModOaX-pyMQ1o-4Zb+vO+uQ4sZu85MGZNCnTg@mail.gmail.com
Whole thread Raw
In response to Re: proposal: PL/Pythonu - function ereport  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: proposal: PL/Pythonu - function ereport  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-hackers
Hi

2015-11-16 23:40 GMT+01:00 Peter Eisentraut <peter_e@gmx.net>:
On 11/15/15 11:29 PM, Pavel Stehule wrote:
>
>
> 2015-11-16 5:20 GMT+01:00 Peter Eisentraut <peter_e@gmx.net
> <mailto:peter_e@gmx.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

pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: proposal: PL/Pythonu - function ereport
Next
From: Peter Geoghegan
Date:
Subject: Re: Using quicksort for every external sort run