Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> Tom Lane wrote:
>> Perhaps RESET AUTOCOMMIT is a good enough answer?
> I was unclear on that. RESET sets it back to the postgresql.conf value,
> right? Do we know that the session didn't change it earlier in the
> script? That's where it gets tricky.
You're postulating a scenario in which some snippet of code doesn't know
what the surrounding script/application likes for AUTOCOMMIT, but does
know enough about the context to know that it's not inside a transaction
block already. That combination seems moderately implausible to me.
Anyone have an example where it'd really be useful?
regards, tom lane