From 0636d4f60fbf80f430464812711a1cbd75672acf Mon Sep 17 00:00:00 2001 From: Tim Chang Date: Tue, 17 Oct 2023 20:38:27 +0000 Subject: [PATCH] Make GUC unalterable for now --- contrib/babelfishpg_tsql/src/guc.c | 14 ++------------ contrib/babelfishpg_tsql/src/pl_exec-2.c | 2 +- contrib/babelfishpg_tsql/src/pl_exec.c | 6 +++--- 3 files changed, 6 insertions(+), 16 deletions(-) diff --git a/contrib/babelfishpg_tsql/src/guc.c b/contrib/babelfishpg_tsql/src/guc.c index 96bedc53bb9..4af26cd2354 100644 --- a/contrib/babelfishpg_tsql/src/guc.c +++ b/contrib/babelfishpg_tsql/src/guc.c @@ -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); @@ -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", diff --git a/contrib/babelfishpg_tsql/src/pl_exec-2.c b/contrib/babelfishpg_tsql/src/pl_exec-2.c index c73693bb1e9..0112fed7b67 100644 --- a/contrib/babelfishpg_tsql/src/pl_exec-2.c +++ b/contrib/babelfishpg_tsql/src/pl_exec-2.c @@ -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); diff --git a/contrib/babelfishpg_tsql/src/pl_exec.c b/contrib/babelfishpg_tsql/src/pl_exec.c index 5fc8255c818..a9df3dbd3e0 100644 --- a/contrib/babelfishpg_tsql/src/pl_exec.c +++ b/contrib/babelfishpg_tsql/src/pl_exec.c @@ -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"); @@ -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; @@ -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