-
Notifications
You must be signed in to change notification settings - Fork 4.1k
sql: pg_function_is_visible is not correct for UDFs #89546
Copy link
Copy link
Closed
Labels
A-sql-pgcompatSemantic compatibility with PostgreSQLSemantic compatibility with PostgreSQLA-sql-routineUDFs and Stored ProceduresUDFs and Stored ProceduresC-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.T-sql-foundationsSQL Foundations Team (formerly SQL Schema + SQL Sessions)SQL Foundations Team (formerly SQL Schema + SQL Sessions)
Metadata
Metadata
Assignees
Labels
A-sql-pgcompatSemantic compatibility with PostgreSQLSemantic compatibility with PostgreSQLA-sql-routineUDFs and Stored ProceduresUDFs and Stored ProceduresC-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.T-sql-foundationsSQL Foundations Team (formerly SQL Schema + SQL Sessions)SQL Foundations Team (formerly SQL Schema + SQL Sessions)
Type
Projects
Status
Done
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