Re: proposal: PL/Pythonu - function ereport

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
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-16 22:40:06
Message-ID: 564A5B46.1000807@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2015-11-16 22:41:41 Re: [PATCH] SQL function to report log message
Previous Message Peter Eisentraut 2015-11-16 22:37:45 Re: pg_hba_lookup function to get all matching pg_hba.conf entries