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: add CREATE SCHEMA IF NOT EXISTS for existing schemas #42703

Merged
merged 1 commit into from
Mar 11, 2020

Conversation

jordanlewis
Copy link
Member

@jordanlewis jordanlewis commented Nov 22, 2019

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)

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@awoods187
Copy link
Contributor

awoods187 commented Nov 22, 2019 via email

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.

Reviewable status: :shipit: 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,

@bobvawter
Copy link
Member

bobvawter commented Mar 10, 2020

CLA assistant check
All committers have signed the CLA.

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

@ajwerner ajwerner left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 12 of 12 files at r2.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @arulajmani, @jordanlewis, and @lucy-zhang)

@jordanlewis
Copy link
Member Author

bors r+

@craig
Copy link
Contributor

craig bot commented Mar 11, 2020

Build failed

@jordanlewis
Copy link
Member Author

Javascript heap OOM?

bors r+

@craig
Copy link
Contributor

craig bot commented Mar 11, 2020

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.

None yet

6 participants