From c66090adcb864b840bb9e1343e2cd28418088f94 Mon Sep 17 00:00:00 2001 From: Sharath BP <32369302+sharathbp@users.noreply.github.com> Date: Fri, 4 Oct 2024 14:04:06 +0530 Subject: [PATCH] Rearrange the SQL statements update script (#3004) Rearrange the SQL statements in upgrade scripts. Issues Resolved: BABEL-429 Signed-off-by: Sharath BP --- .../sql/upgrades/babelfishpg_tsql--2.10.0--2.11.0.sql | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/contrib/babelfishpg_tsql/sql/upgrades/babelfishpg_tsql--2.10.0--2.11.0.sql b/contrib/babelfishpg_tsql/sql/upgrades/babelfishpg_tsql--2.10.0--2.11.0.sql index db54e4c90d..f52c8a9c96 100644 --- a/contrib/babelfishpg_tsql/sql/upgrades/babelfishpg_tsql--2.10.0--2.11.0.sql +++ b/contrib/babelfishpg_tsql/sql/upgrades/babelfishpg_tsql--2.10.0--2.11.0.sql @@ -10,14 +10,12 @@ SELECT set_config('search_path', 'sys, '||current_setting('search_path'), false) * So make sure that any SQL statement (DDL/DML) being added here can be executed multiple times without affecting * final behaviour. */ - +CREATE OR REPLACE PROCEDURE sys.sp_reset_connection() +AS 'babelfishpg_tsql', 'sp_reset_connection_internal' LANGUAGE C; +GRANT EXECUTE ON PROCEDURE sys.sp_reset_connection() TO PUBLIC; -- After upgrade, always run analyze for all babelfish catalogs. CALL sys.analyze_babelfish_catalogs(); -- Reset search_path to not affect any subsequent scripts SELECT set_config('search_path', trim(leading 'sys, ' from current_setting('search_path')), false); - -CREATE OR REPLACE PROCEDURE sys.sp_reset_connection() -AS 'babelfishpg_tsql', 'sp_reset_connection_internal' LANGUAGE C; -GRANT EXECUTE ON PROCEDURE sys.sp_reset_connection() TO PUBLIC;