sql: allow casting a polymorphic routine parameter #123536
Labels
A-sql-pgcompat
Semantic compatibility with PostgreSQL
A-sql-routine
UDFs and Stored Procedures
C-enhancement
Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
docs-known-limitation
T-sql-queries
SQL Queries Team
Since there is no cast from polymorphic types to other types (for example, TEXT), CRDB currently returns an error during function creation for a case like the following:
Postgres, on the other hand, allows the function to be created and called:
We should fix this, either by propagating some context through
SemaContext
to make type-checking ignore polymorphic types in this case, or by always allowing casts from polymorphic types.Jira issue: CRDB-38387
The text was updated successfully, but these errors were encountered: