Skip to content

Add docs for CREATE TABLE ... AS OF SYSTEM TIME #19674

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

rmloveland
Copy link
Contributor

Fixes DOC-13310

@rmloveland rmloveland marked this pull request as draft May 29, 2025 20:45
Copy link

netlify bot commented May 29, 2025

Deploy Preview for cockroachdb-api-docs canceled.

Name Link
🔨 Latest commit 2a368ce
🔍 Latest deploy log https://app.netlify.com/projects/cockroachdb-api-docs/deploys/6851891792fd630008734ad8

Copy link

github-actions bot commented May 29, 2025

Copy link

netlify bot commented May 29, 2025

Deploy Preview for cockroachdb-interactivetutorials-docs canceled.

Name Link
🔨 Latest commit 2a368ce
🔍 Latest deploy log https://app.netlify.com/projects/cockroachdb-interactivetutorials-docs/deploys/68518917829942000877b6e1

Copy link

netlify bot commented May 29, 2025

Netlify Preview

Name Link
🔨 Latest commit 2a368ce
🔍 Latest deploy log https://app.netlify.com/projects/cockroachdb-docs/deploys/685189171d39710008849ea3
😎 Deploy Preview https://deploy-preview-19674--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 project configuration.

@rmloveland rmloveland force-pushed the 20250529-DOC-13310-ctas-aost branch 3 times, most recently from bf54120 to 6b1ca8c Compare June 4, 2025 17:49
@rmloveland rmloveland force-pushed the 20250529-DOC-13310-ctas-aost branch from 0c99b3d to a8f42f6 Compare June 4, 2025 19:03
@rmloveland rmloveland marked this pull request as ready for review June 4, 2025 19:12
@rmloveland rmloveland requested review from rafiss and dikshant June 4, 2025 19:13
Copy link
Contributor

@rafiss rafiss left a comment

Choose a reason for hiding this comment

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

these changes lgtm!

i wasn't sure if @dikshant also wanted to have CREATE MATERIALIZED VIEW ... AS OF SYSTEM TIME documented. i'll leave that decision to him.

@dikshant
Copy link

dikshant commented Jun 9, 2025

Yeah we also want the materialized view part to be documented. But I'll leave it to Rich to decide if he wants to do that in this PR or a new one.

Copy link

@dikshant dikshant left a comment

Choose a reason for hiding this comment

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

Overall LGTM but One more example that I think we should add!

@rmloveland rmloveland requested a review from taroface June 9, 2025 20:04
@rmloveland
Copy link
Contributor Author

Yeah we also want the materialized view part to be documented. But I'll leave it to Rich to decide if he wants to do that in this PR or a new one.

I'll do it in another PR! would rather get this smaller one now in so folks can start using this ASAP

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
Copy link
Contributor Author

@taroface thanks for your feedback on this, in addition to the per-comment updates in 2a368ce, I went and updated the "undo accidental table deletion" example to be a bit more realistic by having the user drop movr.vehicle_location_histories and then recreate it, since (1) it's one of the bigger tables, so hopefully more interesting, (2) it allows us to drop the distraction of populating a tiny fake table in the example, and (3) everything else on the page uses movr so let's stick with it.

PTAL and let me know what you think!

@rmloveland rmloveland requested a review from taroface June 17, 2025 15:28
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.

LGTM, 1 follow-up comment

~~~

~~~
CREATE TABLE AS
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we also need the line NOTICE: CREATE TABLE ... AS does not copy over indexes, default expressions, or constraints; the new table has a hidden rowid primary key column as you have further below? It might be a little confusing why it only shows up in one case and not the other.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants