Skip to content

Conversation

rmloveland
Copy link
Contributor

Fixes DOC-10491

Copy link

github-actions bot commented Aug 6, 2024

Files changed:

Copy link

netlify bot commented Aug 6, 2024

Deploy Preview for cockroachdb-api-docs canceled.

Name Link
🔨 Latest commit 283cb6a
🔍 Latest deploy log https://app.netlify.com/sites/cockroachdb-api-docs/deploys/66b4f0fca10e5b000878ce8a

Copy link

netlify bot commented Aug 6, 2024

Deploy Preview for cockroachdb-interactivetutorials-docs canceled.

Name Link
🔨 Latest commit 283cb6a
🔍 Latest deploy log https://app.netlify.com/sites/cockroachdb-interactivetutorials-docs/deploys/66b4f0fc1cdc3e0008442e18

Copy link

netlify bot commented Aug 6, 2024

Netlify Preview

Name Link
🔨 Latest commit 283cb6a
🔍 Latest deploy log https://app.netlify.com/sites/cockroachdb-docs/deploys/66b4f0fceb28e3000801e1a2
😎 Deploy Preview https://deploy-preview-18792--cockroachdb-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@rmloveland rmloveland requested a review from spilchen August 6, 2024 19:03
@rmloveland rmloveland requested a review from taroface August 7, 2024 14:27
- 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.
Copy link
Contributor

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.

Suggested change
- 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.

Copy link
Contributor Author

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!

Copy link
Contributor

@taroface taroface left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple suggestions

@rmloveland rmloveland enabled auto-merge (squash) August 8, 2024 16:23
@rmloveland rmloveland merged commit ec591c4 into main Aug 8, 2024
6 of 7 checks passed
@rmloveland rmloveland deleted the 20240806-DOC-10491-foreign-keys-on-computed-columns branch August 8, 2024 16:27
mdlinville pushed a commit that referenced this pull request Aug 9, 2024
* Stored computed columns support FKs, with limits

Fixes DOC-10491
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants