cockroach
cockroach copied to clipboard
sql: cross reference tracking of udf usage
Currently, user-defined functions are not allowed to be used within other objects (table, view, udf and etc..), so that forward references to udf and backward references from udf are not recorded at the moment. To enable udf usages, we need to properly track such cross-references.
Jira issue: CRDB-19488
Epic CRDB-19497
#83231 should be done before this
Currently, UDF are only allowed in COLUMN DEFAULT (new table and SET DEFAULT, both don't require a backfill) and check constraint. UDF usage is gated here.
There is limitation in the backfiller that UDF cannot be executed. It need to be fixed before moving on to support UDF usage requiring a backfill (such as adding a column with default to a non-empty table).