diff options
Diffstat (limited to 'src/include/nodes/parsenodes.h')
-rw-r--r-- | src/include/nodes/parsenodes.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h index e58211eac1b..4a2ca81f3c0 100644 --- a/src/include/nodes/parsenodes.h +++ b/src/include/nodes/parsenodes.h @@ -1688,6 +1688,7 @@ typedef struct JsonTableColumn char *name; /* column name */ TypeName *typeName; /* column type name */ JsonPathSpec pathspec; /* path specification, if any */ + char *pathname; /* path name, if any */ JsonFormat *format; /* JSON format clause, if specified */ JsonWrapper wrapper; /* WRAPPER behavior for formatted columns */ bool omit_quotes; /* omit or keep quotes on scalar strings? */ @@ -1698,6 +1699,46 @@ typedef struct JsonTableColumn } JsonTableColumn; /* + * JsonTablePlanType - + * flags for JSON_TABLE plan node types representation + */ +typedef enum JsonTablePlanType +{ + JSTP_DEFAULT, + JSTP_SIMPLE, + JSTP_JOINED, +} JsonTablePlanType; + +/* + * JsonTablePlanJoinType - + * flags for JSON_TABLE join types representation + */ +typedef enum JsonTablePlanJoinType +{ + JSTPJ_INNER = 0x01, + JSTPJ_OUTER = 0x02, + JSTPJ_CROSS = 0x04, + JSTPJ_UNION = 0x08, +} JsonTablePlanJoinType; + +typedef struct JsonTablePlan JsonTablePlan; + +/* + * JsonTablePlan - + * untransformed representation of JSON_TABLE plan node + */ +struct JsonTablePlan +{ + NodeTag type; + JsonTablePlanType plan_type; /* plan type */ + JsonTablePlanJoinType join_type; /* join type (for joined plan only) */ + JsonTablePlan *plan1; /* first joined plan */ + JsonTablePlan *plan2; /* second joined plan */ + char *pathname; /* path name (for simple plan only) */ + int location; /* token location, or -1 if unknown */ +}; + +/* * JsonTable - * untransformed representation of JSON_TABLE */ @@ -1706,6 +1747,7 @@ typedef struct JsonTable NodeTag type; JsonCommon *common; /* common JSON path syntax fields */ List *columns; /* list of JsonTableColumn */ + JsonTablePlan *plan; /* join plan, if specified */ JsonBehavior *on_error; /* ON ERROR behavior, if specified */ Alias *alias; /* table alias in FROM clause */ bool lateral; /* does it have LATERAL prefix? */ |