Pavel Stehule wrote:
So we can have only one procedure level scope variable, which is initialized on start of exception and zeroized on the end of exception block. This behavior is different from my patch, but is better for Oracle compatibility and I prefere its.

I should have commented on this earlier: I don't think exact Oracle compatibility is _at all_ important. This feature won't be bug-for-bug compatible with Oracle in any case (e.g. SQLSTATE vs. SQLERRM) -- I think we should implement what makes the most sense, as long as it provides functionality more or less equivalent to what Oracle does.

As for "what makes the most sense", I like Tom's proposal here:

http://archives.postgresql.org/pgsql-committers/2005-05/msg00311.php

i.e. make SQLSTATE and SQLERRM const variables that are local to EXCEPTION blocks, and make accessing them outside an EXCEPTION block yield an error.

Does this sound reasonable to people?

-Neil

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Reply via email to