Skip to content

Commit

Permalink
Merge pull request #32 from dalibo/fix_parameters_restore
Browse files Browse the repository at this point in the history
fix parameters restoration
  • Loading branch information
yhuelf committed Jun 29, 2023
2 parents 9bc31c8 + 9931b0d commit 455c642
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pg_query_settings.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ static const char* pgqs_config ="pgqs_config";
typedef struct parameter
{
char *name;
const char *oldValue;
char *oldValue;
slist_node node;
} parameter;

Expand Down Expand Up @@ -210,10 +210,10 @@ execPlantuner(Query *parse, const char *query_st, int cursorOptions, ParamListIn
guc_value = pstrdup(TextDatumGetCString(data));

param = malloc(sizeof(parameter));
param->name = guc_name;
param->name = pstrdup(guc_name);

/* Get and store current value for the parameter. */
param->oldValue = GetConfigOption(guc_name, true, false);
param->oldValue = pstrdup(GetConfigOption(guc_name, true, false));

slist_push_head(&paramResetList, &param->node);

Expand Down

0 comments on commit 455c642

Please sign in to comment.