From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | Catalin Iacob <iacobcatalin(at)gmail(dot)com> |
Cc: | Peter Eisentraut <peter_e(at)gmx(dot)net>, Craig Ringer <craig(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: proposal: PL/Pythonu - function ereport |
Date: | 2015-12-31 10:37:59 |
Message-ID: | CAFj8pRCr88gLVr5yMm1XHR7ysGZfpAbhmCyv3HTP2yR0QeVVqA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi
here is new version.
Now I use a common ancestor "plpy.BaseError" for plpy builtin classes. So
plpy.SPIError isn't descendant of plpy.Error and then there are not
possible incompatibility issues.
Instead modification builtin function plpy.debug, plpy.info, ... and
introduction incompatibility I wrote new set of functions with keyword
parameters (used mainly for elevel < ERROR):
plpy.raise_debug, plpy.raise_info, plpy.raise_notice, plpy.raise_warning,
plpy.raise_error and plpy.raise_fatal.
With this patch we can write:
plpy.raise_warning('some is wrong', hint = 'bla bla')
raise plpy.Error(some is wrong', sqlcode = 'XX543')
Regards
Pavel
Attachment | Content-Type | Size |
---|---|---|
plpythonu-spierror-keyword-params-11.patch | text/x-patch | 39.3 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Dilip Kumar | 2015-12-31 11:22:50 | Re: Relation extension scalability |
Previous Message | Noah Misch | 2015-12-31 07:26:15 | Re: Additional role attributes && superuser review |