sql: pg_function_is_visible is not correct for UDFs #89546
Labels
A-sql-pgcompat
Semantic compatibility with PostgreSQL
A-sql-routine
UDFs and Stored Procedures
C-bug
Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
T-sql-foundations
SQL Foundations Team (formerly SQL Schema + SQL Sessions)
Describe the problem
This builtin was added in 2019. The assumptions from back then no longer hold. See:
cockroach/pkg/sql/sem/builtins/pg_builtins.go
Lines 1178 to 1195 in 1ca61ae
Expected behavior
Match the Postgres implementation, and take into account the schemas on the search path. Maybe it also takes into account privileges?
Also, the current implementation is needlessly slow. I hope we can improve the speed of it too.
Environment:
cc @chengxiong-ruan @mgartner
Jira issue: CRDB-20297
Epic CRDB-19147
The text was updated successfully, but these errors were encountered: