Skip to content

Commit

Permalink
Make GUC unalterable for now
Browse files Browse the repository at this point in the history
  • Loading branch information
timchang514 committed Oct 18, 2023
1 parent d18f7de commit 0636d4f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 16 deletions.
14 changes: 2 additions & 12 deletions contrib/babelfishpg_tsql/src/guc.c
Original file line number Diff line number Diff line change
Expand Up @@ -601,16 +601,6 @@ assign_datefirst(int newval, void *extra)
(*pltsql_protocol_plugin_ptr)->set_guc_stat_var("babelfishpg_tsql.datefirst", false, NULL, newval);
}

static void
assign_temp_oid_buffer_size(int newval, void *extra)
{
if (pltsql_protocol_plugin_ptr && *pltsql_protocol_plugin_ptr && (*pltsql_protocol_plugin_ptr)->set_guc_stat_var)
{
(*pltsql_protocol_plugin_ptr)->set_guc_stat_var("babelfishpg_tsql.temp_oid_buffer_size", false, NULL, newval);
temp_oid_buffer_start = InvalidOid;
}
}

void
define_escape_hatch_variables(void);

Expand Down Expand Up @@ -1142,10 +1132,10 @@ define_custom_variables(void)
gettext_noop("Temp oid buffer size"),
NULL,
&temp_oid_buffer_size,
16384, 1, 65536,
65536, 1, 131072, /* Eventually we can make this user adjustable */
PGC_USERSET,
GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE | GUC_DISALLOW_IN_AUTO_FILE,
NULL, assign_temp_oid_buffer_size, NULL);
NULL, NULL, NULL);

/* T-SQL Hint Mapping */
DefineCustomBoolVariable("babelfishpg_tsql.enable_hint_mapping",
Expand Down
2 changes: 1 addition & 1 deletion contrib/babelfishpg_tsql/src/pl_exec-2.c
Original file line number Diff line number Diff line change
Expand Up @@ -1524,7 +1524,7 @@ execute_batch(PLtsql_execstate *estate, char *batch, InlineCodeBlockArgs *args,
Datum retval;
volatile LocalTransactionId before_lxid;
LocalTransactionId after_lxid;
SimpleEcontextStackEntry *volatile topEntry;
SimpleEcontextStackEntry *topEntry;
PLtsql_row *row = NULL;
FmgrInfo flinfo;
InlineCodeBlock *codeblock = makeNode(InlineCodeBlock);
Expand Down
6 changes: 3 additions & 3 deletions contrib/babelfishpg_tsql/src/pl_exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -4426,7 +4426,7 @@ execute_txn_command(PLtsql_execstate *estate, PLtsql_stmt_execsql *stmt)
static void
commit_stmt(PLtsql_execstate *estate, bool txnStarted)
{
SimpleEcontextStackEntry *volatile topEntry = simple_econtext_stack;
SimpleEcontextStackEntry *topEntry = simple_econtext_stack;
MemoryContext oldcontext = CurrentMemoryContext;

elog(DEBUG4, "TSQL TXN Auto commit transaction");
Expand Down Expand Up @@ -5187,7 +5187,7 @@ exec_fmtonly(PLtsql_execstate *estate,
{
volatile LocalTransactionId before_lxid;
LocalTransactionId after_lxid;
SimpleEcontextStackEntry *volatile topEntry;
SimpleEcontextStackEntry *topEntry;

PLtsql_stmt_exec *estmt;
StringInfoData ss;
Expand Down Expand Up @@ -9472,7 +9472,7 @@ exec_set_error(PLtsql_execstate *estate, int error, int pg_error, bool error_map
static void
pltsql_create_econtext(PLtsql_execstate *estate)
{
SimpleEcontextStackEntry *volatile entry;
SimpleEcontextStackEntry *entry;

/*
* Create an EState for evaluation of simple expressions, if there's not
Expand Down

0 comments on commit 0636d4f

Please sign in to comment.