OSDN Git Service

Remove sjson2testsql.pl
[pgstoreplans/pg_store_plans.git] / pgsp_json_int.h
index 93a5a67..6c1ad29 100644 (file)
@@ -2,10 +2,10 @@
  *
  * 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
  *
  *-------------------------------------------------------------------------
  */
@@ -25,7 +25,8 @@ typedef enum
        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);
@@ -52,6 +53,11 @@ typedef enum
        P_Command,
        P_SortMethod,
        P_SortKey,
+       P_GroupKey,
+       P_GroupKeys,
+       P_GroupSets,
+       P_HashKeys,
+       P_HashKey,
        P_Filter,
        P_JoinFilter,
        P_HashCond,
@@ -65,6 +71,9 @@ typedef enum
        P_TriggerName,
        P_TrgRelation,
        P_ConstraintName,
+       P_Parallel,
+       P_PartialMode,
+       P_WorkersPlanned,
 
        P_FunctionCall,
        P_StartupCost,
@@ -108,7 +117,23 @@ typedef enum
        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
@@ -141,7 +166,7 @@ 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 */
@@ -149,6 +174,9 @@ typedef struct
        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 */
@@ -172,6 +200,7 @@ extern const char *conv_strategy(const char *src, pgsp_parser_mode mode);
 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,