-
Notifications
You must be signed in to change notification settings - Fork 4.1k
sql: pg_function_is_visible fails for UDFs #94953
Copy link
Copy link
Closed
Labels
A-schema-catalogRelated to the schema descriptors collection and the catalog API in general.Related to the schema descriptors collection and the catalog API in general.A-sql-pgcompatSemantic compatibility with PostgreSQLSemantic compatibility with PostgreSQLA-sql-routineUDFs and Stored ProceduresUDFs and Stored ProceduresA-sql-vtablesVirtual tables - pg_catalog, information_schema etcVirtual tables - pg_catalog, information_schema etcC-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)
Description
Found while working on #88061.
Describe the problem
pg_function_is_visible() fails for the OID of UDFs.
To Reproduce
> CREATE FUNCTION myfunc(val INT) RETURNS INT CALLED ON NULL INPUT LANGUAGE SQL AS $$ SELECT val $$;
> select pg_function_is_visible(oid) from pg_proc where proname='myfunc';
ERROR: function 100105 does not exist: function undefined
SQLSTATE: 42883Expected behavior
All the OID values in pg_proc are valid inputs to pg_function_is_visible.
cc @rafiss @mgartner @chengxiong-ruan for triage.
Jira issue: CRDB-23241
Epic: CRDB-23454
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-schema-catalogRelated to the schema descriptors collection and the catalog API in general.Related to the schema descriptors collection and the catalog API in general.A-sql-pgcompatSemantic compatibility with PostgreSQLSemantic compatibility with PostgreSQLA-sql-routineUDFs and Stored ProceduresUDFs and Stored ProceduresA-sql-vtablesVirtual tables - pg_catalog, information_schema etcVirtual tables - pg_catalog, information_schema etcC-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)