-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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: add CREATE SCHEMA IF NOT EXISTS for existing schemas #42703
Conversation
Nice! Glad we have this to round out the set.
…On Fri, Nov 22, 2019 at 1:16 PM cockroach-teamcity ***@***.***> wrote:
This change is [image: Reviewable]
<https://reviewable.io/reviews/cockroachdb/cockroach/42703>
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#42703?email_source=notifications&email_token=AFJ7F72D3PK44UHDPSJPX3LQVAOW7A5CNFSM4JQUIDJ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEE6NYWY#issuecomment-557636699>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFJ7F753XWCIMEDVDX5HVUDQVAOW7ANCNFSM4JQUIDJQ>
.
--
Andy Woods
Product Manager, Cockroach Labs
andy@cockroachlabs.com
|
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.
Reviewable status:
complete! 0 of 0 LGTMs obtained (waiting on @arulajmani, @jordanlewis, and @rafiss)
pkg/sql/create_schema.go, line 27 at r1 (raw file):
if !n.n.IfNotExists { return unimplemented.NewWithIssuef(26443, "new schemas are unsupported")
i guess it would be potentially more accurate for the error to say "schema already exists" or something if one does CREATE SCHEMA [public|pg_catalog|crdb_internal]
but it doesn't seem super important, so fine with merging,
This helps compatibility a bit. Release note (sql change): allow no-op CREATE SCHEMA IF NOT EXISTS statements. Release justification: low-risk, high benefit changes to existing functionality (compatibility improvement with no new functionality)
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.
Reviewed 12 of 12 files at r2.
Reviewable status:complete! 1 of 0 LGTMs obtained (waiting on @arulajmani, @jordanlewis, and @lucy-zhang)
bors r+ |
Build failed |
Javascript heap OOM? bors r+ |
Build succeeded |
This helps compatibility a bit.
Release note (sql change): allow no-op CREATE SCHEMA IF NOT EXISTS
statements.
Release justification: low-risk, high benefit changes to existing
functionality (compatibility improvement with no new functionality)