OSDN Git Service

Follow new shared memory request convention since PG15
[pgstoreplans/pg_store_plans.git] / pgsp_json_text.h
index de2d359..a01ba71 100644 (file)
@@ -1,11 +1,11 @@
 /*-------------------------------------------------------------------------
  *
- * pgsp_json_text.h: Defenitions for text plan generator for pg_store_plan.
+ * pgsp_json_text.h: Defenitions for text plan generator for pg_store_plans.
  *
- * Copyright (c) 2012-2015, NIPPON TELEGRAPH AND TELEPHONE CORPORATION
+ * Copyright (c) 2012-2021, NIPPON TELEGRAPH AND TELEPHONE CORPORATION
  *
  * IDENTIFICATION
- *       pg_store_plan/pgsp_json_text.h
+ *       pg_store_plans/pgsp_json_text.h
  *
  *-------------------------------------------------------------------------
  */
@@ -14,6 +14,7 @@ typedef struct
 {
        const char *sort_keys;
        List *group_keys;
+       char *key_type;
 } grouping_set;
 
 typedef struct
@@ -38,6 +39,7 @@ typedef struct
        const char *sort_method;
        StringInfo sort_key;
        StringInfo group_key;
+       StringInfo hash_key;
        List       *grouping_sets;
        const char *index_cond;
        const char *merge_cond;
@@ -92,10 +94,26 @@ typedef struct
        const char *sampling_method;
        StringInfo sampling_params;
        const char *repeatable_seed;
+       bool            parallel_aware;
+       const char *partial_mode;
+       const char *worker_number;
+       const char *workers_planned;
+       const char *workers_launched;
+       bool            inner_unique;
+       bool            async_capable;
+       const char *table_func_name;
+       StringInfo      presorted_key;
+       StringInfo      sortmethod_used;
+       const char *sortspace_mem;
+       const char *group_count;
+       const char *avg_sortspc_used;
+       const char *peak_sortspc_used;
 
        const char *tmp_obj_name;
        const char *tmp_schema_name;
        const char *tmp_alias;
+       List       *_undef;
+       bool            _undef_newelem;
 } node_vals;
 
 #define SETTER(name) pgsp_node_set_##name
@@ -107,6 +125,9 @@ typedef struct
 #define SQLQUOTE_SETTER(name) \
        SETTERDECL(name) { vals->name = quote_identifier(val);}
 
+#define BOOL_SETTER(name) \
+       SETTERDECL(name) { vals->name = (strcmp(val, "true") == 0 ? 1 : 0);}
+
 #define LIST_SETTER(name) \
        SETTERDECL(name) { \
                if (!vals->name || !vals->name->data[0])\
@@ -127,6 +148,7 @@ typedef struct
 extern char *pgsp_json_textize(char *json);
 
 /* Prototypes for setter for node_vals */
+SETTERDECL(_undef);
 SETTERDECL(node_type);
 SETTERDECL(scan_dir);
 SETTERDECL(obj_name);
@@ -140,6 +162,9 @@ SETTERDECL(sort_method);
 SETTERDECL(sort_key);
 SETTERDECL(group_key);
 SETTERDECL(group_keys);
+SETTERDECL(hash_key);
+SETTERDECL(parallel_aware);
+SETTERDECL(partial_mode);
 SETTERDECL(index_name);
 SETTERDECL(startup_cost);
 SETTERDECL(total_cost);
@@ -197,3 +222,15 @@ SETTERDECL(conflicting_tuples);
 SETTERDECL(sampling_method);
 SETTERDECL(sampling_params);
 SETTERDECL(repeatable_seed);
+SETTERDECL(worker_number);
+SETTERDECL(workers_planned);
+SETTERDECL(workers_launched);
+SETTERDECL(inner_unique);
+SETTERDECL(async_capable);
+SETTERDECL(table_func_name);
+SETTERDECL(presorted_key);
+SETTERDECL(sortmethod_used);
+SETTERDECL(sortspace_mem);
+SETTERDECL(group_count);
+SETTERDECL(avg_sortspc_used);
+SETTERDECL(peak_sortspc_used);