Skip to content

Commit

Permalink
Remove pltsql_call_handler from sys.all_objects (#2201)
Browse files Browse the repository at this point in the history
We have fixed duplicate OIDs for most objects, however, `pltsql_call_handler`
still has a possibility of duplicate OIDs after MVU to PG14/15/16
because `GetNewObjectId_hook()` is not called when we restore the first
C function.

This commit removes pltsql_call_handler from sys.all_objects, hence
sys.all_objects won't have duplicate OIDs after major version upgrades.

Task: BABEL-4662
Co-authored-by: Jungkook Lee <[email protected]>
  • Loading branch information
2jungkook and Jungkook Lee authored Jan 3, 2024
1 parent d5911a4 commit ef84a49
Show file tree
Hide file tree
Showing 9 changed files with 445 additions and 181 deletions.
2 changes: 1 addition & 1 deletion .github/scripts/clone_engine_repo.conf
Original file line number Diff line number Diff line change
@@ -1 +1 @@
DEFAULT_BRANCH=BABEL_3_4_STABLE__PG_15_5
DEFAULT_BRANCH=BABEL_4_X_DEV__PG_16_X
1 change: 1 addition & 0 deletions contrib/babelfishpg_tsql/sql/sys_views.sql
Original file line number Diff line number Diff line change
Expand Up @@ -1504,6 +1504,7 @@ and nis.type = (case p.prokind
where (s.nspname = 'sys' or (nis.name is not null and ext.nspname is not null))
and has_schema_privilege(s.oid, 'USAGE')
and has_function_privilege(p.oid, 'EXECUTE')
and p.proname != 'pltsql_call_handler'

union all
-- details of user defined procedures
Expand Down

This file was deleted.

Loading

0 comments on commit ef84a49

Please sign in to comment.