diff options
Diffstat (limited to 'src/include/nodes/plannodes.h')
-rw-r--r-- | src/include/nodes/plannodes.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/include/nodes/plannodes.h b/src/include/nodes/plannodes.h index fb02390da51..9dbb91cb90d 100644 --- a/src/include/nodes/plannodes.h +++ b/src/include/nodes/plannodes.h @@ -15,8 +15,10 @@ #define PLANNODES_H #include "access/sdir.h" +#include "lib/stringinfo.h" #include "nodes/bitmapset.h" #include "nodes/primnodes.h" +#include "nodes/relation.h" #include "utils/lockwaitpolicy.h" @@ -483,6 +485,33 @@ typedef struct ForeignScan bool fsSystemCol; /* true if any "system column" is needed */ } ForeignScan; +/* ---------------- + * CustomScan node + * ---------------- + */ +struct CustomScanMethods; + +typedef struct CustomScan +{ + Scan scan; + uint32 flags; /* mask of CUSTOMPATH_* flags defined in relation.h */ + struct CustomScanMethods *methods; +} CustomScan; + +typedef struct CustomScanMethods +{ + const char *CustomName; + void (*SetCustomScanRef)(struct PlannerInfo *root, + CustomScan *cscan, + int rtoffset); + void (*FinalizeCustomScan)(struct PlannerInfo *root, + CustomScan *cscan, + bool (*finalize_primnode)(), + void *finalize_context); + Node *(*CreateCustomScanState)(CustomScan *cscan); + void (*TextOutCustomScan)(StringInfo str, const CustomScan *node); + CustomScan *(*CopyCustomScan)(const CustomScan *from); +} CustomScanMethods; /* * ========== |