Skip to content

Commit

Permalink
Rearrange the SQL statements update script (#3004)
Browse files Browse the repository at this point in the history
Rearrange the SQL statements in upgrade scripts.

Issues Resolved: BABEL-429

Signed-off-by: Sharath BP <[email protected]>
  • Loading branch information
sharathbp authored Oct 4, 2024
1 parent 58dd341 commit c66090a
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

0 comments on commit c66090a

Please sign in to comment.