Daniel Farina <daniel@heroku.com> writes:
> On Tue, Mar 12, 2013 at 11:51 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Yeah, watching the remote side's datestyle and intervalstyle and
>> matching them (for both input and output) would probably work.
> Alright, so I've been whacking at this and there's one interesting
> thing to ask about: saving and restoring the local GUCs. There are a
> bunch of things about GUCs besides their value that are maintained,
> such as their 'source', so writing a little ad-hoc save/restore is not
> going to do the right thing.
Right, you should use NewGUCNestLevel/AtEOXact_GUC. Look at the fixes
I committed in postgres_fdw a day or two ago for an example.
> So, I can add one more such use of AtEOXact_GUC for the dblink fix,
> but would it also be appropriate to find some new names for the
> concepts (instead of AtEOXact_GUC and isCommit) here to more
> accurately express what's going on?
Meh. I guess we could invent an "EndGUCNestLevel" that's a wrapper
around AtEOXact_GUC, but I'm not that excited about it ...
regards, tom lane