8000 Version 1.1: Add support of transactions and savepoints by CherkashinSergey · Pull Request #6 · postgrespro/pg_variables · GitHub
[go: up one dir, main page]

Skip to content

Version 1.1: Add support of transactions and savepoints #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Apr 25, 2018
Merged
Prev Previous commit
Next Next commit
Fix macro
  • Loading branch information
CherkashinSergey committed Apr 23, 2018
commit e7c12d94f76380c233bab202f92e426804f11767
6 changes: 3 additions & 3 deletions pg_variables.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ static dlist_head *changedVars = NULL;
static MemoryContext changedVarsContext = NULL;
static dlist_head *changedVarsStack = NULL;
#define get_actual_changed_vars_list() \
(dlist_head_element(ChangedVarsStackNode, node, changedVarsStack))-> \
changedVarsList
((dlist_head_element(ChangedVarsStackNode, node, changedVarsStack))-> \
changedVarsList)


/*
Expand Down Expand Up @@ -981,7 +981,7 @@ variable_select_by_values(PG_FUNCTION_ARGS)
oldcontext = MemoryContextSwitchTo(funcctx->multi_call_memory_ctx);

funcctx->tuple_desc = CreateTupleDescCopy(
*get_actual_value_record(variable).tupdesc);
(*get_actual_value_record(variable)).tupdesc);

var = (VariableIteratorRec *) palloc(sizeof(VariableIteratorRec));
var->iterator = array_create_iterator(values, 0, NULL);
Expand Down
4 changes: 2 additions & 2 deletions pg_variables.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,9 @@ extern void insert_savepoint(HashVariableEntry *variable,

/* Internal macros to manage with dlist structure */
#define get_actual_value_scalar(variable) \

This comment was marked as resolved.

This comment was marked as resolved.

&((dlist_head_element(ValueHistoryEntry, node, &variable->data))->value.scalar)
(&((dlist_head_element(ValueHistoryEntry, node, &variable->data))->value.scalar))
#define get_actual_value_record(variable) \
&((dlist_head_element(ValueHistoryEntry, node, &variable->data))->value.record)
(&((dlist_head_element(ValueHistoryEntry, node, &variable->data))->value.record))
#define get_history_entry(node_ptr) \
dlist_container(ValueHistoryEntry, node, node_ptr)

Expand Down
0