Skip to content
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

sql: show ttl_job_cron if ttl_job_cron is not explicitly set #80221

Merged
merged 1 commit into from
Apr 21, 2022

Conversation

otan
Copy link
Contributor

@otan otan commented Apr 20, 2022

Resolves #80215

Release note (sql change): ttl_job_cron is now displayed on SHOW CREATE
TABLE and reloptions by default.

@otan otan requested review from rafiss and a team April 20, 2022 08:02
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@otan otan force-pushed the show_job_cron branch 2 times, most recently from 1f52980 to 3d42c3a Compare April 20, 2022 10:30
Copy link
Collaborator

@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.

nice!

Reviewed 8 of 8 files at r1, all commit messages.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @otan)

@rafiss
Copy link
Collaborator

rafiss commented Apr 20, 2022

simple test fix needed:

=== RUN   TestDataDriven/row_level_ttl
    datadriven_test.go:304:
        /go/src/github.com/cockroachdb/cockroach/pkg/ccl/backupccl/testdata/backup-restore/row_level_ttl:35: SELECT create_statement FROM [SHOW CREATE TABLE d.public.t]
        output didn't match expected:
        @@ -1,6 +1,6 @@
         CREATE TABLE public.t (
           id INT8 NOT NULL,
           crdb_internal_expiration TIMESTAMPTZ NOT VISIBLE NOT NULL DEFAULT current_timestamp():::TIMESTAMPTZ + '00:10:00':::INTERVAL ON UPDATE current_timestamp():::TIMESTAMPTZ + '00:10:00':::INTERVAL,
           CONSTRAINT t_pkey PRIMARY KEY (id ASC)
        -) WITH (ttl = 'on', ttl_automatic_column = 'on', ttl_expire_after = '00:10:00':::INTERVAL)
        +) WITH (ttl = 'on', ttl_automatic_column = 'on', ttl_expire_after = '00:10:00':::INTERVAL, ttl_job_cron = '@hourly')

Release note (sql change): ttl_job_cron is now displayed on SHOW CREATE
TABLE and `reloptions` by default.
@otan otan requested review from a team and stevendanna and removed request for a team April 20, 2022 21:14
@otan
Copy link
Contributor Author

otan commented Apr 21, 2022

bors r=rafiss

@craig
Copy link
Contributor

craig bot commented Apr 21, 2022

Build succeeded:

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.

sql: Display ttl_job_cron value in SHOW and pg_class
3 participants