Re: Sketch of extending error handling for subtransactions - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Sketch of extending error handling for subtransactions
Date
Msg-id 19016.1090818416@sss.pgh.pa.us
Whole thread Raw
In response to Re: Sketch of extending error handling for subtransactions  (Gaetano Mendola <mendola@bigfoot.com>)
Responses Re: Sketch of extending error handling for subtransactions  (Gaetano Mendola <mendola@bigfoot.com>)
List pgsql-hackers
Gaetano Mendola <mendola@bigfoot.com> writes:
> Tom Lane wrote:
> | I was just looking around the net to see exactly what Oracle's PL/SQL
> | syntax is.  It doesn't seem too unreasonable syntax-wise:
> |   [ snip pl/sql syntax ]

> Is this sintax SQL standard driven ?

No, AFAIK it's just Oracle's syntax.

> If not I'd prefere this one:
>    [ some other syntax ]

Can you point to any SQL standard or existing database that uses your
suggestion?  Oracle is certainly the de facto standard in this area,
and plpgsql in particular is an unabashed effort to follow their PL/SQL
implementation...

If we decide that we're going to deliberately vary from Oracle's syntax
and semantics, then I have no problem with try/catch as the keywords.
(That's actually my programming heritage as well, I was using exception
handling with those keywords back in the late 70s at HP.)

> ~        CATCH INTEGER THEN
> ~            ... error handling statements ...
> ~        CATCH VARCHAR THEN

er ... I'm not clear why type names would have anything to do with
exceptions.  What's your vision here exactly?
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: CVS web interface error
Next
From: Christopher Kings-Lynne
Date:
Subject: Weird...but correct?