Bruce,
> Well, Oracle doesn't suppor RELEASE, so we are matching the standard but
> perhaps not allowing easy migration from Oracle.
Well, that's Oracle's problem. Considering the amount of influence they had
over the standard, there's no excuse for their syntax. Also, if someone
converts and Oracle script which does not do RELEASE, it's still ok with us;
they just end up nesting multiple levels and not "releasing" until the main
transaction is committed.
> Don't we see the error from libpq PQexec() return value and other
> interfaces?
As far as I know, DBD::pg does not at this time; it detects an error but does
not return the SQLSTATE, and I'm *sure* that PHP 4 does not. I'm sure there
are other interfaces in the same boat. And nobody has answered the question
of what SQLSTATE ranges indicate an abort state as opposed to something else
-- I get the feeling that this is not at all defined.
> Are you saying how do we detect a failure from a psql
> script?
Right. There are applications out there: shell scripts, ODBC applications,
etc., which are unlikely to *ever* have the ability to read states from
libpq. These applications need to have the ability to detect an abort *by
query* ala T-SQL (e.g. the @@ERROR system variable), so that they can issue
the proper ROLLBACKs.
--
Josh Berkus
Aglio Database Solutions
San Francisco