Thread: pgsql: postgres_fdw: More preliminary refactoring for upcoming join pus

pgsql: postgres_fdw: More preliminary refactoring for upcoming join pus

From
Robert Haas
Date:
postgres_fdw: More preliminary refactoring for upcoming join pushdown.

The code that generates a complete SQL query for a given foreign relation
was repeated in two places, and they didn't quite agree: the EXPLAIN case
left out the locking clause.  Centralize the code so we get the same
behavior everywhere, and adjust calling conventions and which functions
are static vs. extern accordingly .  Centralize the code so we get the same
behavior everywhere, and adjust calling conventions and which functions
are static vs. extern accordingly.

Ashutosh Bapat, reviewed and slightly adjusted by me.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/cc592c48c58d9c1920f8e2063756dcbcce79e4dd

Modified Files
--------------
contrib/postgres_fdw/deparse.c      | 127 +++++++++++++++++++++---------------
contrib/postgres_fdw/postgres_fdw.c |  38 ++++-------
contrib/postgres_fdw/postgres_fdw.h |  18 +----
3 files changed, 93 insertions(+), 90 deletions(-)