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

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: Pavel Stehule <stehule(at)kix(dot)fsv(dot)cvut(dot)cz>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: PROPOSAL - User's exception in PL/pgSQL
Date: 2005-06-16 16:02:25
Message-ID: 200506160902.26143.josh@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 THEN
RAISE 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2005-06-16 16:13:54 Re: Autovacuum in the backend
Previous Message Dave Page 2005-06-16 16:01:15 Re: Autovacuum in the backend