Re: PROPOSAL - User's exception in PL/pgSQL - Mailing list pgsql-hackers

From Josh Berkus
Subject Re: PROPOSAL - User's exception in PL/pgSQL
Date
Msg-id 200506160902.26143.josh@agliodbs.com
Whole thread Raw
In response to PROPOSAL - User's exception in PL/pgSQL  (Pavel Stehule <stehule@kix.fsv.cvut.cz>)
Responses Re: PROPOSAL - User's exception in PL/pgSQL
List pgsql-hackers
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 THENRAISE NOTICE '%',sqlstate;ROLLBACK;

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

--
Josh Berkus
Aglio Database Solutions
San Francisco


pgsql-hackers by date:

Previous
From: "Dave Page"
Date:
Subject: Re: Autovacuum in the backend
Next
From: Josh Berkus
Date:
Subject: Re: Autovacuum in the backend