sql: support CREATE TABLE AS ... WITH NO DATA#171440
Conversation
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
|
Thank you for contributing to CockroachDB. Please ensure you have followed the guidelines for creating a PR. My owl senses detect your PR is good for review. Please keep an eye out for any test failures in CI. 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf. |
rafiss
left a comment
There was a problem hiding this comment.
thanks for your contribution. you need to run ./dev gen docs and then this can get merged
Match PostgreSQL by creating the destination table with the SELECT's schema and no rows when WITH NO DATA is specified. Fixes cockroachdb#171333 Epic: none Release note (sql change): CREATE TABLE AS ... WITH NO DATA is now supported. It creates the destination table with the source query's schema and no rows, matching PostgreSQL.
86f510d to
9f0d237
Compare
|
Thank you for updating your pull request. My owl senses detect your PR is good for review. Please keep an eye out for any test failures in CI. 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf. |
Fixes #171333
Adds support for
CREATE TABLE AS ... WITH NO DATA, matching PostgreSQL.Coverage in
pkg/sql/logictest/testdata/logic_test/create_asincludes regular tables, explicitWITH DATA, default behavior,IF NOT EXISTS, andTEMP TABLE.Epic: none
Release note (sql change): CREATE TABLE AS ... WITH NO DATA is now supported. It creates the destination table with the source query's schema and no rows, matching PostgreSQL