/*-------------------------------------------------------------------------
*
- * 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
*
*-------------------------------------------------------------------------
*/
{
const char *sort_keys;
List *group_keys;
+ char *key_type;
} grouping_set;
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;
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
#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])\
extern char *pgsp_json_textize(char *json);
/* Prototypes for setter for node_vals */
+SETTERDECL(_undef);
SETTERDECL(node_type);
SETTERDECL(scan_dir);
SETTERDECL(obj_name);
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);
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);