ALTER COLUMN TYPE Now Generally Available
ALTER COLUMN TYPE is now generally available (GA). This provides enhanced schema flexibility for your CockroachDB deployments. This release significantly expands the capabilities of ALTER COLUMN TYPE and simplifies its usage.
Key improvements include:
Transactions Automatically Commit Before DDL Statements
CockroachDB now automatically commits the current transaction before executing DDL statements. With this change, data definition language (DDL) statements now trigger an automatic commit of any preceding data manipulation language (DML) statements. This change eliminates common errors from mixing DDL and DML. The cluster setting autocommit_before_ddl enables this behavior and is set to on by default. To disable this behavior run ALTER ROLE ALL SET autocommit_before_ddl = off;. See the backward incompatible changes section for additional information.
Improvements to Stored Procedures and User Defined Functions (UDFs)
Expanded support for stored procedures, user-defined functions, and PL/pgSQL blocks. This release introduces several features that enhance your ability to write complex database logic. The changes include:
WITH queries) within stored procedures and user-defined functions (UDFs)RETURNS TABLE in SQL-language UDFsDOstatements (anonymous code blocks) written in PL/pgSQL