Re: postgres_fdw vs data formatting GUCs (was Re: [v9.3] writable foreign tables)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Daniel Farina <daniel(at)heroku(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: postgres_fdw vs data formatting GUCs (was Re: [v9.3] writable foreign tables)
Date: 2013-03-22 19:29:59
Message-ID: 28625.1363980599@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Daniel Farina <daniel(at)heroku(dot)com> writes:
> This contains some edits to comments that referred to the obsolete and
> bogus TupleDesc scanning. No mechanical alterations.

Applied with some substantial revisions. I didn't like where you'd put
the apply/restore calls, for one thing --- we need to wait to do the
applies until we have the PGresult in hand, else we might be applying
stale values of the remote's GUCs. Also, adding a call that could throw
errors right before materializeResult() won't do, because that would
result in leaking the PGresult on error. The struct for state seemed a
bit of a mess too, given that you couldn't always initialize it in one
place. (In hindsight I could have left that alone given where I ended
up putting the calls, but it didn't seem to be providing any useful
isolation.)

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2013-03-22 19:47:30 Re: Materialized view assertion failure in HEAD
Previous Message Jeff Davis 2013-03-22 19:06:52 Re: Default connection parameters for postgres_fdw and dblink