> I might be confused here, but I think the point is that if you pass > "true" as the third argument to set_config, the setting lasts only for > the duration of the current transaction, like SET LOCAL. Which I > think solves your problem.
Yes, but at the end of transaction it is reset to the value it has before transaction (session level value), which can be nonempty. I wrote example about this problem lately in this thread.