cockroach icon indicating copy to clipboard operation
cockroach copied to clipboard

sql: cross reference tracking of udf usage

Open chengxiong-ruan opened this issue 3 years ago • 1 comments

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

chengxiong-ruan avatar Sep 09 '22 13:09 chengxiong-ruan

#83231 should be done before this

chengxiong-ruan avatar Sep 22 '22 21:09 chengxiong-ruan

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).

chengxiong-ruan avatar Jul 20 '23 21:07 chengxiong-ruan