Re: proposal: enable new error fields in plpgsql (9.4) - Mailing list pgsql-hackers

From Noah Misch
Subject Re: proposal: enable new error fields in plpgsql (9.4)
Date
Msg-id 20130628160821.GC924898@tornado.leadboat.com
Whole thread Raw
In response to Re: proposal: enable new error fields in plpgsql (9.4)  (Pavel Stehule <pavel.stehule@gmail.com>)
Responses Re: proposal: enable new error fields in plpgsql (9.4)  (Noah Misch <noah@leadboat.com>)
List pgsql-hackers
On Fri, Jun 28, 2013 at 05:21:29PM +0200, Pavel Stehule wrote:
> 2013/6/28 Noah Misch <noah@leadboat.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.

> p.s. you cannot to specify CONTEXT in RAISE statement

Oops; right.

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



pgsql-hackers by date:

Previous
From: Stefan Kaltenbrunner
Date:
Subject: Re: PostgreSQL 9.3 latest dev snapshot
Next
From: Simon Riggs
Date:
Subject: Re: ALTER TABLE ... ALTER CONSTRAINT