-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#23114] YSQL: Implement ALTER TABLE.. SET SCHEMA..
Summary: The diff implements the syntax: * `ALTER TABLE t SET SCHEMA s` * `ALTER TABLE IF EXISTS t SET SCHEMA s` PG side: * Fixed `AlterObjectSchemaStmt` handling in the grammar. * Updated `AlterRelationNamespaceInternal` handler. * New function `YBCAlterTableNamespace`. YB side: * New `YBCPgAlterTableSetSchema` function. * New `PgApiImpl::AlterTableSetSchema` wrapper. * New `PgAlterTable::SetSchema` method. * Added `string schema_name` into `PgRenameTablePB` proto-buffer. * Updated `YBTableAlterer::ToRequest`. * Updated `CatalogManager::AlterTable`. * Added `YBTableName::YBTableName(YQLDatabase db_type)` constructor. **Upgrade/Rollback safety:** The changed `PgRenameTablePB` is only used for communications between PG & TS processes. The processes should be always in sync, so the change does not need `AutoFlag` or any other special handling for the upgrade safety. Jira: DB-12047 Test Plan: Updated tests for SET SCHEMA: ./yb_build.sh --java-test org.yb.pgsql.TestPgRegressTable#testPgRegressTable ./yb_build.sh --java-test org.yb.pgsql.TestPgRegressMisc#testPgRegressMiscSerial ./yb_build.sh --java-test org.yb.pgsql.TestPgRegressThirdPartyExtensionsPgaudit#schedule New C++ tests for SET SCHEMA: ./yb_build.sh --cxx-test pg_mini-test --gtest_filter PgMiniTest.AlterTableSetSchema ./yb_build.sh --cxx-test pg_mini-test --gtest_filter PgMiniTest.AlterPartitionedTableSetSchema Other related tests: ./yb_build.sh --java-test org.yb.pgsql.TestPgRegressMatview#testPgRegressMatview Reviewers: mihnea, fizaa, myang, xCluster, hsunder Reviewed By: myang Subscribers: jason, ybase, yql Differential Revision: https://phorge.dev.yugabyte.com/D36474
- Loading branch information
1 parent
ef62972
commit 34f9741
Showing
23 changed files
with
354 additions
and
59 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
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
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
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.