| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| #ifndef EXTENSIBLE_H |
| #define EXTENSIBLE_H |
|
|
| #include "access/parallel.h" |
| #include "commands/explain.h" |
| #include "nodes/execnodes.h" |
| #include "nodes/pathnodes.h" |
| #include "nodes/plannodes.h" |
|
|
| |
| #define EXTNODENAME_MAX_LEN 64 |
|
|
| |
| |
| |
| |
| |
| |
| typedef struct ExtensibleNode |
| { |
| pg_node_attr(custom_copy_equal, custom_read_write) |
|
|
| NodeTag type; |
| const char *extnodename; |
| } ExtensibleNode; |
|
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| typedef struct ExtensibleNodeMethods |
| { |
| const char *extnodename; |
| Size node_size; |
| void (*nodeCopy) (struct ExtensibleNode *newnode, |
| const struct ExtensibleNode *oldnode); |
| bool (*nodeEqual) (const struct ExtensibleNode *a, |
| const struct ExtensibleNode *b); |
| void (*nodeOut) (struct StringInfoData *str, |
| const struct ExtensibleNode *node); |
| void (*nodeRead) (struct ExtensibleNode *node); |
| } ExtensibleNodeMethods; |
|
|
| extern void RegisterExtensibleNodeMethods(const ExtensibleNodeMethods *methods); |
| extern const ExtensibleNodeMethods *GetExtensibleNodeMethods(const char *extnodename, |
| bool missing_ok); |
|
|
| |
| |
| |
| |
| |
| #define CUSTOMPATH_SUPPORT_BACKWARD_SCAN 0x0001 |
| #define CUSTOMPATH_SUPPORT_MARK_RESTORE 0x0002 |
| #define CUSTOMPATH_SUPPORT_PROJECTION 0x0004 |
|
|
| |
| |
| |
| |
| typedef struct CustomPathMethods |
| { |
| const char *CustomName; |
|
|
| |
| struct Plan *(*PlanCustomPath) (PlannerInfo *root, |
| RelOptInfo *rel, |
| struct CustomPath *best_path, |
| List *tlist, |
| List *clauses, |
| List *custom_plans); |
| struct List *(*ReparameterizeCustomPathByChild) (PlannerInfo *root, |
| List *custom_private, |
| RelOptInfo *child_rel); |
| } CustomPathMethods; |
|
|
| |
| |
| |
| |
| typedef struct CustomScanMethods |
| { |
| const char *CustomName; |
|
|
| |
| Node *(*CreateCustomScanState) (CustomScan *cscan); |
| } CustomScanMethods; |
|
|
| |
| |
| |
| |
| typedef struct CustomExecMethods |
| { |
| const char *CustomName; |
|
|
| |
| void (*BeginCustomScan) (CustomScanState *node, |
| EState *estate, |
| int eflags); |
| TupleTableSlot *(*ExecCustomScan) (CustomScanState *node); |
| void (*EndCustomScan) (CustomScanState *node); |
| void (*ReScanCustomScan) (CustomScanState *node); |
|
|
| |
| void (*MarkPosCustomScan) (CustomScanState *node); |
| void (*RestrPosCustomScan) (CustomScanState *node); |
|
|
| |
| Size (*EstimateDSMCustomScan) (CustomScanState *node, |
| ParallelContext *pcxt); |
| void (*InitializeDSMCustomScan) (CustomScanState *node, |
| ParallelContext *pcxt, |
| void *coordinate); |
| void (*ReInitializeDSMCustomScan) (CustomScanState *node, |
| ParallelContext *pcxt, |
| void *coordinate); |
| void (*InitializeWorkerCustomScan) (CustomScanState *node, |
| shm_toc *toc, |
| void *coordinate); |
| void (*ShutdownCustomScan) (CustomScanState *node); |
|
|
| |
| void (*ExplainCustomScan) (CustomScanState *node, |
| List *ancestors, |
| ExplainState *es); |
| } CustomExecMethods; |
|
|
| extern void RegisterCustomScanMethods(const CustomScanMethods *methods); |
| extern const CustomScanMethods *GetCustomScanMethods(const char *CustomName, |
| bool missing_ok); |
|
|
| #endif |
|
|