"Simon Riggs" <simon(at)2ndquadrant(dot)com> writes:
> Most importantly, other references I have state that: the ANSI SQL-99
> specification does require that if a statement errors then only that
> statement's changes are rolled back.
No. The spec says
The execution of a <rollback statement> may be initiated implicitly
by an SQL-implementation when it detects unrecoverable errors.
and leaves it up to the implementation to define what is "unrecoverable".
Currently Postgres treats all errors as "unrecoverable". This is
certainly not ideal, but it is within the letter of the spec.
regards, tom lane