Re: User's exception plpgsql - Mailing list pgsql-patches

From Pavel Stehule
Subject Re: User's exception plpgsql
Date
Msg-id Pine.LNX.4.44.0507061844030.23774-100000@kix.fsv.cvut.cz
Whole thread Raw
In response to Re: User's exception plpgsql  (Neil Conway <neilc@samurai.com>)
List pgsql-patches
> "exception variable" in the first place. What does it buy us over simply
> using a string? In other words, if we allowed the syntax:
>
> RAISE LEVEL [ opt_sqlstate ] 'fmt' [, expr ... ]
>
> where `opt_sqlstate' is either empty, a T_WORD we find in the table of
> predefined condition names, or an expression that evaluates to a text
> value. The text value must be of a certain form (e.g. 5 characters in
> length, begins with a "U" and so on).

I unlike this syntax. Yes, it's easy and clear, but not readable.
Exception variables are better and an way for future. SQL state can be
only one value wich can hold exception variable. And more it's more in
oracle style (I don't wont to copy all Oracle ware into PostgreSQL)

Pavel

p.s. I have patch for rethrow exception which isn't related to user's
exception (but need's finished plpgsql code). Syntax is easy, I hope

RAISE;





pgsql-patches by date:

Previous
From: Neil Conway
Date:
Subject: Re: User's exception plpgsql
Next
From: Tom Lane
Date:
Subject: Re: User's exception plpgsql