1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-24 09:27:52 +03:00

Introduce custom path and scan providers.

This allows extension modules to define their own methods for
scanning a relation, and get the core code to use them.  It's
unclear as yet how much use this capability will find, but we
won't find out if we never commit it.

KaiGai Kohei, reviewed at various times and in various levels
of detail by Shigeru Hanada, Tom Lane, Andres Freund, Álvaro
Herrera, and myself.
This commit is contained in:
Robert Haas
2014-11-07 17:26:02 -05:00
parent 7250d8535b
commit 0b03e5951b
22 changed files with 638 additions and 10 deletions

View File

@@ -128,6 +128,15 @@ extern Path *reparameterize_path(PlannerInfo *root, Path *path,
Relids required_outer,
double loop_count);
/*
* Interface definition of custom-scan providers
*/
extern void register_custom_path_provider(CustomPathMethods *cpp_methods);
extern void create_customscan_paths(PlannerInfo *root,
RelOptInfo *baserel,
RangeTblEntry *rte);
/*
* prototypes for relnode.c
*/

View File

@@ -86,6 +86,7 @@ extern ModifyTable *make_modifytable(PlannerInfo *root,
List *withCheckOptionLists, List *returningLists,
List *rowMarks, int epqParam);
extern bool is_projection_capable_plan(Plan *plan);
extern Node *replace_nestloop_params(PlannerInfo *root, Node *expr);
/*
* prototypes for plan/initsplan.c
@@ -130,6 +131,8 @@ extern bool query_is_distinct_for(Query *query, List *colnos, List *opids);
*/
extern Plan *set_plan_references(PlannerInfo *root, Plan *plan);
extern void fix_opfuncids(Node *node);
extern Node *fix_scan_expr(PlannerInfo *root, Node *node, int rtoffset);
extern void fix_expr_common(PlannerInfo *root, Node *node);
extern void set_opfuncid(OpExpr *opexpr);
extern void set_sa_opfuncid(ScalarArrayOpExpr *opexpr);
extern void record_plan_function_dependency(PlannerInfo *root, Oid funcid);