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

From Pavel Stehule
Subject proposal: PL/Pythonu - function ereport
Date
Msg-id CAFj8pRCHfN-JXktA47Gnj6epKC05eGES9tBK-z3PoMp1FMKHmw@mail.gmail.com
Whole thread Raw
Responses Re: proposal: PL/Pythonu - function ereport  (Pavel Stehule <pavel.stehule@gmail.com>)
Re: proposal: PL/Pythonu - function ereport  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
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');

Comments, notices, objections?

Regards

Pavel

pgsql-hackers by date:

Previous
From: Kyotaro HORIGUCHI
Date:
Subject: Re: [Proposal] Table partition + join pushdown
Next
From: Etsuro Fujita
Date:
Subject: Re: Foreign join pushdown vs EvalPlanQual