Skip to content

Commit

Permalink
Remove pltsql_call_handler from sys.all_objects
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
Signed-off-by: Jungkook Lee <[email protected]>
  • Loading branch information
Jungkook Lee committed Jan 3, 2024
1 parent 2273124 commit 94e66a6
Show file tree
Hide file tree
Showing 4 changed files with 438 additions and 0 deletions.
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
Loading

0 comments on commit 94e66a6

Please sign in to comment.