Mike Finn <mike.finn@tacticalExecutive.com> writes:
> My guess is that the underlying problem is that psql really doesn't
> know when it is in an interactive session or not.
No, the real problem is that we have only one mechanism for recovering
to a valid state after an error, and that is transaction abort.
Distinguishing statement abort from transaction abort will require
a huge amount of work --- every transaction-or-longer-lifetime data
structure in the backend will need to be looked at, for example, to see
how it can be rolled back to the proper state after a statement abort.
It'll probably get done someday, but don't hold your breath ...
regards, tom lane