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

From Pavel Stehule
Subject Re: proposal: PL/Pythonu - function ereport
Date
Msg-id CAFj8pRB4=hhU4zkuMKR0Ku0mKC1eXVoXgr3RV=EP+BVQUZf2tg@mail.gmail.com
Whole thread Raw
In response to proposal: PL/Pythonu - function ereport  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-hackers


2015-10-08 12:11 GMT+02:00 Pavel Stehule <pavel.stehule@gmail.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

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: More work on SortSupport for text - strcoll() and strxfrm() caching
Next
From: Jeremy Harris
Date:
Subject: Re: Getting sorted data from foreign server