Re: proposal: enable new error fields in plpgsql (9.4)

From: Noah Misch <noah(at)leadboat(dot)com>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: Rushabh Lathia <rushabh(dot)lathia(at)gmail(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Marko Tiikkaja <pgmail(at)joh(dot)to>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: proposal: enable new error fields in plpgsql (9.4)
Date: 2013-07-02 20:22:00
Message-ID: 20130702202200.GA996935@tornado.leadboat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jun 28, 2013 at 12:08:21PM -0400, Noah Misch wrote:
> On Fri, Jun 28, 2013 at 05:21:29PM +0200, Pavel Stehule wrote:
> > 2013/6/28 Noah Misch <noah(at)leadboat(dot)com>:
> > > Okay. I failed to note the first time through that while the patch uses the
> > > same option names for RAISE and GET STACKED DIAGNOSTICS, the existing option
> > > lists for those commands differ:
> > >
> > > --RAISE option-- --GET STACKED DIAGNOSTICS option--
> > > ERRCODE RETURNED_SQLSTATE
> > > MESSAGE MESSAGE_TEXT
> > > DETAIL PG_EXCEPTION_DETAIL
> > > HINT PG_EXCEPTION_HINT
> > > CONTEXT PG_EXCEPTION_CONTEXT
> > >
> > > To be consistent with that pattern, I think we would use COLUMN, CONSTRAINT,
> > > TABLE, TYPE and SCHEMA as the new RAISE options.
> >
> > I understand to your motivation, but I am not sure. Minimally word
> > "TYPE" is too general. I have not strong opinion in this area. maybe
> > DATATYPE ??
>
> I'm not positive either. DATATYPE rather than TYPE makes sense.

Here's a revision bearing the discussed name changes and protocol
documentation tweaks, along with some cosmetic adjustments. If this seems
good to you, I will commit it.

--
Noah Misch
EnterpriseDB http://www.enterprisedb.com

Attachment Content-Type Size
enhanced_error_fields_plpgsql-v3.patch text/plain 28.8 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2013-07-02 20:22:05 Re: Support for REINDEX CONCURRENTLY
Previous Message Robert Haas 2013-07-02 20:00:22 Re: [9.4 CF 1] The Commitfest Slacker List