Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Ewe, I was hoping for something with zero overhead for the non-SET case.
Well, a function call and immediate return if no SET has been executed
in the current xact seems low enough overhead to me. We'll just keep
a flag showing whether there's anything to do.
regards, tom lane