-
Notifications
You must be signed in to change notification settings - Fork 470
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
V25.1.0 ga #19382
V25.1.0 ga #19382
Conversation
Files changed:
|
✅ Deploy Preview for cockroachdb-api-docs canceled.
|
✅ Deploy Preview for cockroachdb-interactivetutorials-docs canceled.
|
✅ Netlify Preview
To edit notification comments on pull requests, go to your Netlify site configuration. |
|
||
Key improvements include: | ||
<ul> | ||
<li>Full support for check constraints, enabling you to maintain data integrity while modifying column types</li> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this one about "full support for check constraints" is correct, i just had @spilchen (engineer on this feature) review my docs PR (this line and our public v25.1 docs still say here that "You cannot alter the data type of a column if .. The column has CHECK constraints."
i think the other lines are correct AFAICT
cc @dikshant FYI
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmmm this example works tho
CREATE TABLE users (
id UUID DEFAULT gen_random_uuid() UNIQUE PRIMARY KEY,
email VARCHAR(100) NOT NULL DEFAULT 'pending@example.com',
first_name VARCHAR(50),
last_name VARCHAR(50),
status VARCHAR(20) NOT NULL
DEFAULT 'active'
CHECK (status IN ('active', 'inactive', 'pending')),
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
INDEX idx_users_status (status)
);
ALTER TABLE users ALTER COLUMN status TYPE VARCHAR(50);
So I don't know if what you are saying is true either. @spilchen thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a nuance to this. In the working case above, the column type change (VARCHAR(20) -> VARCHAR(50)) doesn’t trigger a column rewrite—it only updates the column's metadata. Since these types are compatible, the existing CHECK CONSTRAINT remains valid. However, if you were to change VARCHAR to INT, for example, that would require a column rewrite, which would be blocked due to the CHECK CONSTRAINT.
Do we need to clarify the scenarios in which a column rewrite occurs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for release notes we can leave it out. But in docs we will want to cover that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've removed that bullet from the feature highlight. Thanks for the quick turnaround.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple corrections on the SQL Queries side. Also, suggesting a change to the backward-incompatible section.
src/current/_includes/releases/v25.1/feature-highlights-sql.html
Outdated
Show resolved
Hide resolved
src/current/_includes/releases/v25.1/feature-highlights-sql.html
Outdated
Show resolved
Hide resolved
src/current/_includes/releases/v25.1/feature-highlights-sql.html
Outdated
Show resolved
Hide resolved
src/current/_includes/releases/v25.1/feature-highlights-sql.html
Outdated
Show resolved
Hide resolved
Co-authored-by: Ryan Kuo <8740013+taroface@users.noreply.github.com>
Co-authored-by: Ryan Kuo <8740013+taroface@users.noreply.github.com>
Co-authored-by: Ryan Kuo <8740013+taroface@users.noreply.github.com>
Co-authored-by: Ryan Kuo <8740013+taroface@users.noreply.github.com>
Co-authored-by: Ryan Kuo <8740013+taroface@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
No description provided.