-
Notifications
You must be signed in to change notification settings - Fork 473
Stored computed columns support FKs, with limits #18792
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
Stored computed columns support FKs, with limits #18792
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. |
- Cannot be used to generate other computed columns. | ||
- Behave like any other column, with the exception that they cannot be written to directly. | ||
- Are mutually exclusive with [`DEFAULT`]({% link {{ page.version.version }}/default-value.md %}) and [`ON UPDATE`]({% link {{ page.version.version }}/create-table.md %}#on-update-expressions) expressions. | ||
- Can be used in [`FOREIGN KEY`]({% link {{ page.version.version }}/foreign-key.md %}) constraints, but restricted to the following subset of supported options. The restriction to this subset is necessary because we cannot allow the computed column value to change. Prior to this change, stored computed columns could not be used in foreign key constraints at all. |
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.
Should there be a "new in 24.2" tag here? I think the last sentence should be cut because it reads like a release note and will likely confuse in subsequent versions.
- Can be used in [`FOREIGN KEY`]({% link {{ page.version.version }}/foreign-key.md %}) constraints, but restricted to the following subset of supported options. The restriction to this subset is necessary because we cannot allow the computed column value to change. Prior to this change, stored computed columns could not be used in foreign key constraints at all. | |
- Can be used in [`FOREIGN KEY`]({% link {{ page.version.version }}/foreign-key.md %}) constraints, but are restricted to the following subset of supported options. This restriction is necessary because we cannot allow the computed column value to change. |
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.
good points both
updated the text as you suggested
also added the "new in" thingy
PTAL!
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 suggestions
* Stored computed columns support FKs, with limits Fixes DOC-10491
Fixes DOC-10491