mirror of
https://github.com/postgres/postgres.git
synced 2025-06-11 20:28:21 +03:00
Redo postgres_fdw's planner code so it can handle parameterized paths.
I wasn't going to ship this without having at least some example of how to do that. This version isn't terribly bright; in particular it won't consider any combinations of multiple join clauses. Given the cost of executing a remote EXPLAIN, I'm not sure we want to be very aggressive about doing that, anyway. In support of this, refactor generate_implied_equalities_for_indexcol so that it can be used to extract equivalence clauses that aren't necessarily tied to an index.
This commit is contained in:
@ -42,17 +42,20 @@ extern int ExtractConnectionOptions(List *defelems,
|
||||
extern void classifyConditions(PlannerInfo *root,
|
||||
RelOptInfo *baserel,
|
||||
List **remote_conds,
|
||||
List **param_conds,
|
||||
List **local_conds,
|
||||
List **param_numbers);
|
||||
List **local_conds);
|
||||
extern bool is_foreign_expr(PlannerInfo *root,
|
||||
RelOptInfo *baserel,
|
||||
Expr *expr);
|
||||
extern void deparseSelectSql(StringInfo buf,
|
||||
PlannerInfo *root,
|
||||
RelOptInfo *baserel,
|
||||
Bitmapset *attrs_used);
|
||||
extern void appendWhereClause(StringInfo buf,
|
||||
PlannerInfo *root,
|
||||
RelOptInfo *baserel,
|
||||
List *exprs,
|
||||
bool is_first);
|
||||
bool is_first,
|
||||
List **params);
|
||||
extern void deparseInsertSql(StringInfo buf, PlannerInfo *root,
|
||||
Index rtindex, Relation rel,
|
||||
List *targetAttrs, List *returningList);
|
||||
|
Reference in New Issue
Block a user