Neil Conway <[EMAIL PROTECTED]> writes:
> BTW, is there any value in a separate "EXCEPTION" type? ISTM that an 
> exception is just a SQLSTATE, which is in turn just a string. A separate 
> exception type does simplify the parsing of RAISE, but I wonder if it 
> would be useful to be able to also allow specifying the SQLSTATE code as 
> a string literal.

It would save some typing, but I do not think we can make the proposed
syntax work if we do it that way:

>> RAISE level [ exception_name , ] format_string [ , parameters ] ;
>> 
>> where "level" is one of the already-defined level keywords?

How will you tell whether the string literal just after "level" is meant
to be a SQLSTATE or a format?  Maybe with some ad-hoc tests, but ugh ...

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faq

Reply via email to