diff options
author | Robert Haas <rhaas@postgresql.org> | 2016-01-30 10:32:38 -0500 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2016-01-30 10:32:38 -0500 |
commit | cc592c48c58d9c1920f8e2063756dcbcce79e4dd (patch) | |
tree | b3c640bb4c286ffc04bae290a6f84c24e4ee83bc /contrib/postgres_fdw/postgres_fdw.h | |
parent | 2251179e6ad3a865d2f55e1832fab34608fcce43 (diff) | |
download | postgresql-cc592c48c58d9c1920f8e2063756dcbcce79e4dd.tar.gz postgresql-cc592c48c58d9c1920f8e2063756dcbcce79e4dd.zip |
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.
Diffstat (limited to 'contrib/postgres_fdw/postgres_fdw.h')
-rw-r--r-- | contrib/postgres_fdw/postgres_fdw.h | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/contrib/postgres_fdw/postgres_fdw.h b/contrib/postgres_fdw/postgres_fdw.h index 0d8c271505c..bf83c91481c 100644 --- a/contrib/postgres_fdw/postgres_fdw.h +++ b/contrib/postgres_fdw/postgres_fdw.h @@ -83,19 +83,6 @@ extern void classifyConditions(PlannerInfo *root, extern bool is_foreign_expr(PlannerInfo *root, RelOptInfo *baserel, Expr *expr); -extern void deparseSelectSql(StringInfo buf, - PlannerInfo *root, - RelOptInfo *baserel, - Bitmapset *attrs_used, - List **retrieved_attrs); -extern void deparseLockingClause(StringInfo buf, - PlannerInfo *root, RelOptInfo *rel); -extern void appendWhereClause(StringInfo buf, - PlannerInfo *root, - RelOptInfo *baserel, - List *exprs, - bool is_first, - List **params); extern void deparseInsertSql(StringInfo buf, PlannerInfo *root, Index rtindex, Relation rel, List *targetAttrs, bool doNothing, List *returningList, @@ -113,8 +100,9 @@ extern void deparseAnalyzeSql(StringInfo buf, Relation rel, List **retrieved_attrs); extern void deparseStringLiteral(StringInfo buf, const char *val); extern Expr *find_em_expr_for_rel(EquivalenceClass *ec, RelOptInfo *rel); -extern void appendOrderByClause(StringInfo buf, PlannerInfo *root, - RelOptInfo *baserel, List *pathkeys); +extern void deparseSelectStmtForRel(StringInfo buf, PlannerInfo *root, + RelOptInfo *baserel, List *remote_conds, List *pathkeys, + List **retrieved_attrs, List **params_list); /* in shippable.c */ extern bool is_builtin(Oid objectId); |