Re: PROPOSAL - User's exception in PL/pgSQL

From: Pavel Stehule <stehule(at)kix(dot)fsv(dot)cvut(dot)cz>
To: Josh Berkus <josh(at)agliodbs(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: PROPOSAL - User's exception in PL/pgSQL
Date: 2005-06-16 19:00:04
Message-ID: Pine.LNX.4.44.0506162059270.13602-100000@kix.fsv.cvut.cz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, 16 Jun 2005, Josh Berkus wrote:

> Pavel,
>
> >  o User can specify SQLSTATE only from class 'U1'
> >  o Default values for SQLSTATE usr excpt are from class 'U0'
> >  o Every exception's variable has unique SQLSTATE
> >  o User's exception or system's exception can be raised only with
> >    level EXCEPTION
> >
> > Any comments, notes?
>
> Looks great to me, pending a code examination. Will it also be possible to
> query the SQLSTATE/ERRSTRING inside the EXCEPTION clause? i.e.
>
> WHEN OTHERS THEN
> RAISE NOTICE '%',sqlstate;
> ROLLBACK;

yes, ofcourse. CVS can it now

>
> That's something missing from 8.0 exception handling that makes it hard to
> improve SPs with better error messages.
>
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2005-06-16 19:06:57 Re: Proposal - Continue stmt for PL/pgSQL
Previous Message Jonah H. Harris 2005-06-16 18:51:45 Re: Proposal - Continue stmt for PL/pgSQL