*
* pgsp_json_int.h: Definitions for internal use for pgsp_json.c
*
- * Copyright (c) 2012-2015, NIPPON TELEGRAPH AND TELEPHONE CORPORATION
+ * Copyright (c) 2012-2021, NIPPON TELEGRAPH AND TELEPHONE CORPORATION
*
* IDENTIFICATION
- * pg_store_plan/pgsp_json_int.h
+ * pg_store_plans/pgsp_json_int.h
*
*-------------------------------------------------------------------------
*/
S_Invalid,
S_Plain,
S_Sorted,
- S_Hashed
+ S_Hashed,
+ S_Mixed
} pgsp_strategies;
typedef const char *(converter_t)(const char *src, pgsp_parser_mode mode);
P_Command,
P_SortMethod,
P_SortKey,
+ P_GroupKey,
+ P_GroupKeys,
+ P_GroupSets,
+ P_HashKeys,
+ P_HashKey,
P_Filter,
P_JoinFilter,
P_HashCond,
P_TriggerName,
P_TrgRelation,
P_ConstraintName,
+ P_Parallel,
+ P_PartialMode,
+ P_WorkersPlanned,
P_FunctionCall,
P_StartupCost,
P_ConfRes,
P_ConfArbitIdx,
P_TuplesInserted,
- P_ConfTuples
+ P_ConfTuples,
+ P_SamplingMethod,
+ P_SamplingParams,
+ P_RepeatableSeed,
+ P_Workers,
+ P_WorkersLaunched,
+ P_WorkerNumber,
+ P_InnerUnique,
+ P_TableFuncName,
+ P_PresortedKey,
+ P_FullsortGroups,
+ P_SortMethodsUsed,
+ P_SortSpaceMemory,
+ P_GroupCount,
+ P_AvgSortSpcUsed,
+ P_PeakSortSpcUsed,
+ P_PreSortedGroups
} pgsp_prop_tags;
typedef struct
bool remove; /* True if the current node is not shown in
* the result */
bool last_elem_is_object; /* True if the last processed element
- * was not an object */
+ * was an object */
pgsp_prop_tags section; /* explain section under processing */
pgsp_prop_tags current_list; /* current list tag that needs special treat*/
StringInfo work_str; /* StringInfor for very-short term usage */
char *fname; /* Field name*/
char *wbuf; /* Working buffer */
int wbuflen; /* Length of the working buffer */
+ int wlist_level; /* Nest level of list for Grouping Sets */
+ grouping_set *tmp_gset; /* Working area for grouping sets */
+
converter_t *valconverter; /* field name converter for the current
* element */
setter_t *setter; /* value converter for the current element */
extern const char *conv_setsetopcommand(const char *src, pgsp_parser_mode mode);
extern const char *conv_sortmethod(const char *src, pgsp_parser_mode mode);
extern const char *conv_sortspacetype(const char *src, pgsp_parser_mode mode);
+extern const char *conv_partialmode(const char *src, pgsp_parser_mode mode);
extern bool run_pg_parse_json(JsonLexContext *lex, JsonSemAction *sem);
extern void init_parser_context(pgspParserContext *ctx, int mode,