DoltgreSQL currently omits framework-registered built-in functions from pg_catalog.pg_proc. Built-ins execute normally, but clients that inspect PostgreSQL catalogs cannot discover their names, signatures, argument types, or return types.
For example, PostgreSQL 15.17 exposes pg_catalog.hashtext(text) -> integer, while DoltgreSQL can execute pg_catalog.hashtext(...) but returns no matching pg_proc row. The same limitation applies systemically to other built-ins and predates hashtext support.
server/tables/pgcatalog/pg_proc.go currently builds the cache with functions.IterateCurrentDatabase, which enumerates database/user functions, and contains an explicit TODO: add built-in functions.
The implementation should enumerate all framework-registered built-ins and populate accurate PostgreSQL-compatible metadata for every overload/signature. It should handle stable OIDs, namespaces, argument and return types, strictness, set-returning functions, aggregates/procedures where applicable, and duplicate prevention. It should not special-case individual functions such as hashtext.
Representative regression coverage should confirm both catalog discovery and direct execution for built-ins, including overloaded functions.
DoltgreSQL currently omits framework-registered built-in functions from
pg_catalog.pg_proc. Built-ins execute normally, but clients that inspect PostgreSQL catalogs cannot discover their names, signatures, argument types, or return types.For example, PostgreSQL 15.17 exposes
pg_catalog.hashtext(text) -> integer, while DoltgreSQL can executepg_catalog.hashtext(...)but returns no matchingpg_procrow. The same limitation applies systemically to other built-ins and predates hashtext support.server/tables/pgcatalog/pg_proc.gocurrently builds the cache withfunctions.IterateCurrentDatabase, which enumerates database/user functions, and contains an explicitTODO: add built-in functions.The implementation should enumerate all framework-registered built-ins and populate accurate PostgreSQL-compatible metadata for every overload/signature. It should handle stable OIDs, namespaces, argument and return types, strictness, set-returning functions, aggregates/procedures where applicable, and duplicate prevention. It should not special-case individual functions such as hashtext.
Representative regression coverage should confirm both catalog discovery and direct execution for built-ins, including overloaded functions.