forked from cockroachdb/cockroach
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
backupccl: support restoring views with into_db
The `RESTORE ... into_db = 'foo'` option allows overriding the destination database for all restored tables, views and sequences. Previously this option could not be used when restoring views, as the view query string could contain references to tables qualified with their original database name(s), and we did not support rewriting that query to reflect the overridden destination for those tables. This change adds that rewriting (except for tables/sequences named in strings, see cockroachdb#24556). Since a destination override is applied to all tables being restored, and since restoring a view requires restoring all tables it references, any table referenced by the view query -- regardless of its prior qualification -- can be re-qualified with the override DB. Release note (enterprise change): support restoring views when using the 'into_db' option.
- Loading branch information
Showing
4 changed files
with
218 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.