diff options
Diffstat (limited to 'src/backend/nodes/outfuncs.c')
-rw-r--r-- | src/backend/nodes/outfuncs.c | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/src/backend/nodes/outfuncs.c b/src/backend/nodes/outfuncs.c index 3e1c3e6be57..28d983c9a87 100644 --- a/src/backend/nodes/outfuncs.c +++ b/src/backend/nodes/outfuncs.c @@ -26,6 +26,7 @@ #include <ctype.h> #include "lib/stringinfo.h" +#include "nodes/extensible.h" #include "nodes/plannodes.h" #include "nodes/relation.h" #include "utils/datum.h" @@ -140,6 +141,13 @@ _outToken(StringInfo str, const char *s) } } +/* for use by extensions which define extensible nodes */ +void +outToken(StringInfo str, const char *s) +{ + _outToken(str, s); +} + static void _outList(StringInfo str, const List *node) { @@ -196,6 +204,13 @@ _outBitmapset(StringInfo str, const Bitmapset *bms) appendStringInfoChar(str, ')'); } +/* for use by extensions which define extensible nodes */ +void +outBitmapset(StringInfo str, const Bitmapset *bms) +{ + _outBitmapset(str, bms); +} + /* * Print the value of a Datum given its type. */ @@ -2114,6 +2129,27 @@ _outPlannerParamItem(StringInfo str, const PlannerParamItem *node) /***************************************************************************** * + * Stuff from extensible.h + * + *****************************************************************************/ + +static void +_outExtensibleNode(StringInfo str, const ExtensibleNode *node) +{ + const ExtensibleNodeMethods *methods; + + methods = GetExtensibleNodeMethods(node->extnodename, false); + + WRITE_NODE_TYPE("EXTENSIBLENODE"); + + WRITE_STRING_FIELD(extnodename); + + /* serialize the private fields */ + methods->nodeOut(str, node); +} + +/***************************************************************************** + * * Stuff from parsenodes.h. * *****************************************************************************/ @@ -3367,6 +3403,10 @@ _outNode(StringInfo str, const void *obj) _outPlannerParamItem(str, obj); break; + case T_ExtensibleNode: + _outExtensibleNode(str, obj); + break; + case T_CreateStmt: _outCreateStmt(str, obj); break; |