Re: proposal: PL/Pythonu - function ereport

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: proposal: PL/Pythonu - function ereport
Date: 2015-10-08 18:53:58
Message-ID: CAFj8pRB4=hhU4zkuMKR0Ku0mKC1eXVoXgr3RV=EP+BVQUZf2tg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2015-10-08 12:11 GMT+02:00 Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>:

> Hi
>
> We cannot to raise PostgreSQL exception with setting all possible fields.
> I propose new function
>
> plpy.ereport(level, [ message [, detail [, hint [, sqlstate, ... ]]]])
>
> The implementation will be based on keyword parameters, so only required
> parameters should be used.
>
> Examples:
>
> plpy.ereport(plpy.NOTICE, 'some message', 'some detai')
> plpy.ereport(plpy.ERROR, 'some message', sqlstate = 'zx243');
>

patch attached

regards

Pavel

>
> Comments, notices, objections?
>
> Regards
>
> Pavel
>

Attachment Content-Type Size
plpython-ereport.patch text/x-patch 15.5 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeremy Harris 2015-10-08 19:04:07 Re: Getting sorted data from foreign server
Previous Message Robert Haas 2015-10-08 18:37:01 Re: More work on SortSupport for text - strcoll() and strxfrm() caching