Skip to content

Clarify that table and view schema are now dumped in the right order #1923

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

Merged
merged 2 commits into from
Sep 21, 2017

Conversation

jseldess
Copy link
Contributor

Fixes #1842

@mjibson, was this ported back to a 1.0 patch release? If not, should we add a 1.0 known limitation about this?

@jseldess jseldess requested a review from maddyblue September 21, 2017 03:14
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@jseldess jseldess force-pushed the dump-with-views-references branch from f0d56ba to b972042 Compare September 21, 2017 03:17
@cockroach-teamcity
Copy link
Member

Copy link
Contributor

@maddyblue maddyblue left a comment

Choose a reason for hiding this comment

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

This was not backported to 1.0. We should indeed list it as a known limitation.

@jseldess jseldess force-pushed the dump-with-views-references branch from b972042 to e83474d Compare September 21, 2017 16:27
@cockroach-teamcity
Copy link
Member

@jseldess
Copy link
Contributor Author

@mjibson, added 2 known limitations for 1.0:

  • alphabetical ordering of dumped schemas, which isn't always correct for import
  • error when dumping data for a view or database containing a view

I found another bug that wasn't mentioned anywhere: the schema for a view gets dumped as a CREATE TABLE statement, not a CREATE VIEW statement.

@maddyblue
Copy link
Contributor

:lgtm:


Review status: 0 of 3 files reviewed at latest revision, 2 unresolved discussions, all commit checks successful.


v1.0/known-limitations.md, line 352 at r2 (raw file):

{{site.data.alerts.callout_info}}Resolved as of version 1.1. See <a href="https://github.com/cockroachdb/cockroach/pull/17581">#17581</a>.{{site.data.alerts.end}}

When using the [`cockroach dump`](sql-dump.html) command to export the schemas of all tables and views in a database, the schemas are order alphabetically by name. This is not always an ordering in which the tables and views can be successfully recreated. Also, the schemas of views are dumped incorrectly as `CREATE TABLE` statements.

order -> ordered


v1.0/known-limitations.md, line 418 at r2 (raw file):

CREATE VIEW b AS SELECT b FROM c;
);

remove this line


Comments from Reviewable

@jseldess jseldess force-pushed the dump-with-views-references branch from e83474d to 50ed559 Compare September 21, 2017 20:30
@jseldess
Copy link
Contributor Author

Review status: 0 of 3 files reviewed at latest revision, 2 unresolved discussions, all commit checks successful.


v1.0/known-limitations.md, line 352 at r2 (raw file):

Previously, mjibson (Matt Jibson) wrote…

order -> ordered

Done.


v1.0/known-limitations.md, line 418 at r2 (raw file):

Previously, mjibson (Matt Jibson) wrote…

remove this line

Done.


Comments from Reviewable

@cockroach-teamcity
Copy link
Member

@jseldess jseldess merged commit b93a9ff into master Sep 21, 2017
@jseldess jseldess deleted the dump-with-views-references branch September 21, 2017 21:36
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.

3 participants