Skip to content

Commit

Permalink
Should set pltsql_implicit_transactions = false as default (#2250)
Browse files Browse the repository at this point in the history
We have wrongly set default for pltsql_implicit_transactions = true for
Postgres 16 to pass the explicit value check.

Task: BABEL-4663
Signed-off-by: Zhibai Song <[email protected]>
  • Loading branch information
forestkeeper authored Jan 13, 2024
1 parent f0e08f6 commit ae6f155
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions contrib/babelfishpg_tsql/src/guc.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ bool pltsql_allow_windows_login = true;
bool pltsql_allow_fulltext_parser = false;

bool pltsql_xact_abort = false;
bool pltsql_implicit_transactions = true;
bool pltsql_implicit_transactions = false;
bool pltsql_cursor_close_on_commit = false;
bool pltsql_disable_batch_auto_commit = false;
bool pltsql_disable_internal_savepoint = false;
Expand Down Expand Up @@ -880,11 +880,15 @@ define_custom_variables(void)
GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE | GUC_DISALLOW_IN_AUTO_FILE,
NULL, NULL, NULL);

pltsql_implicit_transactions = false;
// define babelfishpg_tsql.ansi_defaults will set pltsql_implicit_transactions = true
// that's not expected during initialize, set to false as the same for default

DefineCustomBoolVariable("babelfishpg_tsql.implicit_transactions",
gettext_noop("enable implicit transactions"),
NULL,
&pltsql_implicit_transactions,
true,
false,
PGC_USERSET,
GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE | GUC_DISALLOW_IN_AUTO_FILE,
NULL, NULL, NULL);
Expand Down

0 comments on commit ae6f155

Please sign in to comment.