Allow multiple columns in the same table to be modified within the same ALTER statement (one operation) #80578
Labels
A-sql-execution
Relating to SQL execution.
A-sql-executor
SQL txn logic
C-enhancement
Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
T-sql-foundations
SQL Foundations Team (formerly SQL Schema + SQL Sessions)
Is your feature request related to a problem? Please describe.
This is a feature request.
Currently we are not able to make multiple modifications to different columns on the same table within the same ALTER statement. We need to issue multiple ALTER statements to the same table in order to make multiple changes. This can be problematic, especially for very large tables, as the "downtime" for the table affected can be quite substantial.
The following fails when modifying 2 existing columns simultaneously within the same alter table statement on the same table:
The following works, if we are adding 2 new columns:
Describe the solution you'd like
The solution here would be to allow something other RDBMS already do (PostgreSQL does as well) which is allow someone to make multiple changes to the same table within the same ALTER statement.
i.e. This should work
Describe alternatives you've considered
The current alternative is to issue 2 separate alter table statements as shown below:
Jira issue: CRDB-15339
The text was updated successfully, but these errors were encountered: