>> Should psql run every statement in a nested transaction and only rollback
>> that TX?
> psql is designed to follow the same logical statement progression as any
> other connection to the database. Your suggestion could muck up sql
> scripts piped through it to the database.
The other objection is that this would create very substantial overhead.
It might be reasonable to offer that behavior as an option, but I think
I'd only want it on for interactive input.
regards, tom lane