Re: postgres_fdw vs data formatting GUCs (was Re: [v9.3] writable foreign tables) - Mailing list pgsql-hackers

From Tom Lane
Subject Re: postgres_fdw vs data formatting GUCs (was Re: [v9.3] writable foreign tables)
Date
Msg-id 28625.1363980599@sss.pgh.pa.us
Whole thread Raw
In response to Re: postgres_fdw vs data formatting GUCs (was Re: [v9.3] writable foreign tables)  (Daniel Farina <daniel@heroku.com>)
Responses Re: postgres_fdw vs data formatting GUCs (was Re: [v9.3] writable foreign tables)  (Daniel Farina <daniel@heroku.com>)
List pgsql-hackers
Daniel Farina <daniel@heroku.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



pgsql-hackers by date:

Previous
From: Jeff Davis
Date:
Subject: Re: Default connection parameters for postgres_fdw and dblink
Next
From: Tom Lane
Date:
Subject: Re: Materialized view assertion failure in HEAD