This is an automated email from the ASF dual-hosted git repository.
duanzhengqiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new 2fc9e52 support alter foreign table for pg/og (#14944)
2fc9e52 is described below
commit 2fc9e52d2cd5de0644b28e67c713c631859ea837
Author: tuichenchuxin <[email protected]>
AuthorDate: Fri Jan 21 08:15:27 2022 +0800
support alter foreign table for pg/og (#14944)
---
.../src/main/antlr4/imports/opengauss/BaseRule.g4 | 3 +
.../sql/parser/autogen/OpenGaussStatement.g4 | 1 +
.../impl/OpenGaussDDLStatementSQLVisitor.java | 7 +++
.../src/main/antlr4/imports/postgresql/BaseRule.g4 | 3 +
.../sql/parser/autogen/PostgreSQLStatement.g4 | 1 +
.../impl/PostgreSQLDDLStatementSQLVisitor.java | 7 +++
.../core/database/visitor/SQLVisitorRule.java | 2 +
.../statement/ddl/AlterForeignTableStatement.java | 28 +++++++++
.../ddl/OpenGaussAlterForeignTableStatement.java | 29 +++++++++
.../ddl/PostgreSQLAlterForeignTableStatement.java | 29 +++++++++
.../jaxb/cases/domain/SQLParserTestCases.java | 5 ++
.../statement/ddl/AlterForeignTableTestCase.java | 26 ++++++++
.../resources/case/ddl/alter-foreign-table.xml | 73 ++++++++++++++++++++++
.../sql/supported/ddl/alter-foreign-table.xml | 73 ++++++++++++++++++++++
.../main/resources/sql/unsupported/unsupported.xml | 71 ---------------------
15 files changed, 287 insertions(+), 71 deletions(-)
diff --git
a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-opengauss/src/main/antlr4/imports/opengauss/BaseRule.g4
b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-opengauss/src/main/antlr4/imports/opengauss/BaseRule.g4
index b5a3962..516a332 100644
---
a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-opengauss/src/main/antlr4/imports/opengauss/BaseRule.g4
+++
b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-opengauss/src/main/antlr4/imports/opengauss/BaseRule.g4
@@ -206,6 +206,7 @@ unreservedWord
| EXECUTE
| EXPLAIN
| EXPRESSION
+ | EXTENDED
| EXTENSION
| EXTERNAL
| FAMILY
@@ -258,6 +259,7 @@ unreservedWord
| LOCK
| LOCKED
| LOGGED
+ | MAIN
| MAPPING
| MATCH
| MATERIALIZED
@@ -302,6 +304,7 @@ unreservedWord
| PARTITION
| PASSING
| PASSWORD
+ | PLAIN
| PLANS
| POLICY
| PRECEDING
diff --git
a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-opengauss/src/main/antlr4/org/apache/shardingsphere/sql/parser/autogen/OpenGaussStatement.g4
b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-opengauss/src/main/antlr4/org/apache/shardingsphere/sql/parser/autogen/OpenGaussStatement.g4
index 12e22bc..8f7c986 100644
---
a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-opengauss/src/main/antlr4/org/apache/shardingsphere/sql/parser/autogen/OpenGaussStatement.g4
+++
b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-opengauss/src/main/antlr4/org/apache/shardingsphere/sql/parser/autogen/OpenGaussStatement.g4
@@ -58,6 +58,7 @@ execute
| alterDatabase
| alterDomain
| alterDefaultPrivileges
+ | alterForeignTable
| alterProcedure
| alterServer
| alterSequence
diff --git
a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-opengauss/src/main/java/org/apache/shardingsphere/sql/parser/opengauss/visitor/statement/impl/OpenGaussDDLStatementSQLVisitor.java
b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-opengauss/src/main/java/org/apache/shardingsphere/sql/parser/opengauss/visitor/statement/impl/OpenGaussDDLStatementSQLVisitor.java
index e480657..e20b5e3 100644
---
a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-opengauss/src/main/java/org/apache/shardingsphere/sql/parser/opengauss/visitor/statement/impl/OpenGaussDDLStatementSQLVisitor.java
+++
b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-opengauss/src/main/java/org/apache/shardingsphere/sql/parser/opengauss/visitor/statement/impl/OpenGaussDDLStatementSQLVisitor.java
@@ -91,6 +91,7 @@ import
org.apache.shardingsphere.sql.parser.autogen.OpenGaussStatementParser.Tab
import
org.apache.shardingsphere.sql.parser.autogen.OpenGaussStatementParser.TableNameClauseContext;
import
org.apache.shardingsphere.sql.parser.autogen.OpenGaussStatementParser.TableNamesClauseContext;
import
org.apache.shardingsphere.sql.parser.autogen.OpenGaussStatementParser.TruncateTableContext;
+import
org.apache.shardingsphere.sql.parser.autogen.OpenGaussStatementParser.AlterForeignTableContext;
import
org.apache.shardingsphere.sql.parser.autogen.OpenGaussStatementParser.ValidateConstraintSpecificationContext;
import
org.apache.shardingsphere.sql.parser.sql.common.segment.ddl.AlterDefinitionSegment;
import
org.apache.shardingsphere.sql.parser.sql.common.segment.ddl.CreateDefinitionSegment;
@@ -122,6 +123,7 @@ import
org.apache.shardingsphere.sql.parser.sql.dialect.statement.opengauss.ddl.
import
org.apache.shardingsphere.sql.parser.sql.dialect.statement.opengauss.ddl.OpenGaussAlterDefaultPrivilegesStatement;
import
org.apache.shardingsphere.sql.parser.sql.dialect.statement.opengauss.ddl.OpenGaussAlterDomainStatement;
import
org.apache.shardingsphere.sql.parser.sql.dialect.statement.opengauss.ddl.OpenGaussAlterExtensionStatement;
+import
org.apache.shardingsphere.sql.parser.sql.dialect.statement.opengauss.ddl.OpenGaussAlterForeignTableStatement;
import
org.apache.shardingsphere.sql.parser.sql.dialect.statement.opengauss.ddl.OpenGaussAlterFunctionStatement;
import
org.apache.shardingsphere.sql.parser.sql.dialect.statement.opengauss.ddl.OpenGaussAlterIndexStatement;
import
org.apache.shardingsphere.sql.parser.sql.dialect.statement.opengauss.ddl.OpenGaussAlterLanguageStatement;
@@ -287,6 +289,11 @@ public final class OpenGaussDDLStatementSQLVisitor extends
OpenGaussStatementSQL
}
@Override
+ public ASTNode visitAlterForeignTable(final AlterForeignTableContext ctx) {
+ return new OpenGaussAlterForeignTableStatement();
+ }
+
+ @Override
public ASTNode visitAddConstraintSpecification(final
AddConstraintSpecificationContext ctx) {
return new
AddConstraintDefinitionSegment(ctx.getStart().getStartIndex(),
ctx.getStop().getStopIndex(), (ConstraintDefinitionSegment)
visit(ctx.tableConstraint()));
}
diff --git
a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/antlr4/imports/postgresql/BaseRule.g4
b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/antlr4/imports/postgresql/BaseRule.g4
index de68b0f..fa0c9db 100644
---
a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/antlr4/imports/postgresql/BaseRule.g4
+++
b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/antlr4/imports/postgresql/BaseRule.g4
@@ -205,6 +205,7 @@ unreservedWord
| EXECUTE
| EXPLAIN
| EXPRESSION
+ | EXTENDED
| EXTENSION
| EXTERNAL
| FAMILY
@@ -257,6 +258,7 @@ unreservedWord
| LOCK
| LOCKED
| LOGGED
+ | MAIN
| MAPPING
| MATCH
| MATERIALIZED
@@ -301,6 +303,7 @@ unreservedWord
| PARTITION
| PASSING
| PASSWORD
+ | PLAIN
| PLANS
| POLICY
| PRECEDING
diff --git
a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/antlr4/org/apache/shardingsphere/sql/parser/autogen/PostgreSQLStatement.g4
b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/antlr4/org/apache/shardingsphere/sql/parser/autogen/PostgreSQLStatement.g4
index 3b2f610..03e94e2 100644
---
a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/antlr4/org/apache/shardingsphere/sql/parser/autogen/PostgreSQLStatement.g4
+++
b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/antlr4/org/apache/shardingsphere/sql/parser/autogen/PostgreSQLStatement.g4
@@ -60,6 +60,7 @@ execute
| alterDomain
| alterDefaultPrivileges
| alterForeignDataWrapper
+ | alterForeignTable
| alterProcedure
| alterServer
| alterSequence
diff --git
a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/java/org/apache/shardingsphere/sql/parser/postgresql/visitor/statement/impl/PostgreSQLDDLStatementSQLVisitor.java
b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/java/org/apache/shardingsphere/sql/parser/postgresql/visitor/statement/impl/PostgreSQLDDLStatementSQLVisitor.java
index 177da05..f0b6576 100644
---
a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/java/org/apache/shardingsphere/sql/parser/postgresql/visitor/statement/impl/PostgreSQLDDLStatementSQLVisitor.java
+++
b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/java/org/apache/shardingsphere/sql/parser/postgresql/visitor/statement/impl/PostgreSQLDDLStatementSQLVisitor.java
@@ -94,6 +94,7 @@ import
org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.Ta
import
org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.TableNamesClauseContext;
import
org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.TruncateTableContext;
import
org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.ValidateConstraintSpecificationContext;
+import
org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.AlterForeignTableContext;
import
org.apache.shardingsphere.sql.parser.sql.common.segment.ddl.AlterDefinitionSegment;
import
org.apache.shardingsphere.sql.parser.sql.common.segment.ddl.CreateDefinitionSegment;
import
org.apache.shardingsphere.sql.parser.sql.common.segment.ddl.column.ColumnDefinitionSegment;
@@ -126,6 +127,7 @@ import
org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.ddl
import
org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.ddl.PostgreSQLAlterForeignDataWrapperStatement;
import
org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.ddl.PostgreSQLAlterDomainStatement;
import
org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.ddl.PostgreSQLAlterExtensionStatement;
+import
org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.ddl.PostgreSQLAlterForeignTableStatement;
import
org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.ddl.PostgreSQLAlterFunctionStatement;
import
org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.ddl.PostgreSQLAlterIndexStatement;
import
org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.ddl.PostgreSQLAlterLanguageStatement;
@@ -301,6 +303,11 @@ public final class PostgreSQLDDLStatementSQLVisitor
extends PostgreSQLStatementS
}
@Override
+ public ASTNode visitAlterForeignTable(final AlterForeignTableContext ctx) {
+ return new PostgreSQLAlterForeignTableStatement();
+ }
+
+ @Override
public ASTNode visitAddConstraintSpecification(final
AddConstraintSpecificationContext ctx) {
return new
AddConstraintDefinitionSegment(ctx.getStart().getStartIndex(),
ctx.getStop().getStopIndex(), (ConstraintDefinitionSegment)
visit(ctx.tableConstraint()));
}
diff --git
a/shardingsphere-sql-parser/shardingsphere-sql-parser-engine/src/main/java/org/apache/shardingsphere/sql/parser/core/database/visitor/SQLVisitorRule.java
b/shardingsphere-sql-parser/shardingsphere-sql-parser-engine/src/main/java/org/apache/shardingsphere/sql/parser/core/database/visitor/SQLVisitorRule.java
index e7a5d01..791dac8 100644
---
a/shardingsphere-sql-parser/shardingsphere-sql-parser-engine/src/main/java/org/apache/shardingsphere/sql/parser/core/database/visitor/SQLVisitorRule.java
+++
b/shardingsphere-sql-parser/shardingsphere-sql-parser-engine/src/main/java/org/apache/shardingsphere/sql/parser/core/database/visitor/SQLVisitorRule.java
@@ -58,6 +58,8 @@ public enum SQLVisitorRule {
ALTER_FOREIGN_DATA_WRAPPER("AlterForeignDataWrapper",
SQLStatementType.DDL),
+ ALTER_FOREIGN_TABLE("AlterForeignTable", SQLStatementType.DDL),
+
DROP_TABLE("DropTable", SQLStatementType.DDL),
TRUNCATE_TABLE("TruncateTable", SQLStatementType.DDL),
diff --git
a/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/statement/ddl/AlterForeignTableStatement.java
b/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/statement/ddl/AlterForeignTableStatement.java
new file mode 100644
index 0000000..ea9fd68
--- /dev/null
+++
b/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/statement/ddl/AlterForeignTableStatement.java
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.sql.parser.sql.common.statement.ddl;
+
+import lombok.ToString;
+import
org.apache.shardingsphere.sql.parser.sql.common.statement.AbstractSQLStatement;
+
+/**
+ * Alter foreign table statement.
+ */
+@ToString
+public abstract class AlterForeignTableStatement extends AbstractSQLStatement
implements DDLStatement {
+}
diff --git
a/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/dialect/statement/opengauss/ddl/OpenGaussAlterForeignTableStatement.java
b/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/dialect/statement/opengauss/ddl/OpenGaussAlterForeignTableStatement.java
new file mode 100644
index 0000000..4a3f154
--- /dev/null
+++
b/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/dialect/statement/opengauss/ddl/OpenGaussAlterForeignTableStatement.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package
org.apache.shardingsphere.sql.parser.sql.dialect.statement.opengauss.ddl;
+
+import lombok.ToString;
+import
org.apache.shardingsphere.sql.parser.sql.common.statement.ddl.AlterForeignTableStatement;
+import
org.apache.shardingsphere.sql.parser.sql.dialect.statement.opengauss.OpenGaussStatement;
+
+/**
+ * OpenGauss alter foreign table statement.
+ */
+@ToString
+public final class OpenGaussAlterForeignTableStatement extends
AlterForeignTableStatement implements OpenGaussStatement {
+}
diff --git
a/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/dialect/statement/postgresql/ddl/PostgreSQLAlterForeignTableStatement.java
b/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/dialect/statement/postgresql/ddl/PostgreSQLAlterForeignTableStatement.java
new file mode 100644
index 0000000..b3b560e
--- /dev/null
+++
b/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/dialect/statement/postgresql/ddl/PostgreSQLAlterForeignTableStatement.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package
org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.ddl;
+
+import lombok.ToString;
+import
org.apache.shardingsphere.sql.parser.sql.common.statement.ddl.AlterForeignTableStatement;
+import
org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.PostgreSQLStatement;
+
+/**
+ * PostgreSQL alter foreign table statement.
+ */
+@ToString
+public final class PostgreSQLAlterForeignTableStatement extends
AlterForeignTableStatement implements PostgreSQLStatement {
+}
diff --git
a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/SQLParserTestCases.java
b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/SQLParserTestCases.java
index 5d04314..9e02f9d 100644
---
a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/SQLParserTestCases.java
+++
b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/SQLParserTestCases.java
@@ -97,6 +97,7 @@ import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl.AlterDomainStatementTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl.AlterForeignDataWrapperTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl.AlterExtensionStatementTestCase;
+import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl.AlterForeignTableTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl.AlterFunctionStatementTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl.AlterIndexStatementTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl.AlterLanguageStatementTestCase;
@@ -1019,6 +1020,9 @@ public final class SQLParserTestCases {
@XmlElement(name = "alter-foreign-data-wrapper")
private final List<AlterForeignDataWrapperTestCase>
alterForeignDataWrapperTestCase = new LinkedList<>();
+ @XmlElement(name = "alter-foreign-table")
+ private final List<AlterForeignTableTestCase> alterForeignTableTestCase =
new LinkedList<>();
+
@XmlElement(name = "create-text-search")
private final List<CreateTextSearchStatementTestCase>
createTextSearchStatementTestCases = new LinkedList<>();
@@ -1298,6 +1302,7 @@ public final class SQLParserTestCases {
putAll(alterCollationStatementTestCase, result);
putAll(alterDefaultPrivilegesTestCase, result);
putAll(alterForeignDataWrapperTestCase, result);
+ putAll(alterForeignTableTestCase, result);
putAll(createTextSearchStatementTestCases, result);
putAll(alterTextSearchStatementTestCases, result);
putAll(createLanguageStatementTestCases, result);
diff --git
a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/ddl/AlterForeignTableTestCase.java
b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/ddl/AlterForeignTableTestCase.java
new file mode 100644
index 0000000..d98ec69
--- /dev/null
+++
b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/ddl/AlterForeignTableTestCase.java
@@ -0,0 +1,26 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl;
+
+import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.SQLParserTestCase;
+
+/**
+ * Alter foreign table statement test case.
+ */
+public final class AlterForeignTableTestCase extends SQLParserTestCase {
+}
diff --git
a/shardingsphere-test/shardingsphere-parser-test/src/main/resources/case/ddl/alter-foreign-table.xml
b/shardingsphere-test/shardingsphere-parser-test/src/main/resources/case/ddl/alter-foreign-table.xml
new file mode 100644
index 0000000..e35da90
--- /dev/null
+++
b/shardingsphere-test/shardingsphere-parser-test/src/main/resources/case/ddl/alter-foreign-table.xml
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one or more
+ ~ contributor license agreements. See the NOTICE file distributed with
+ ~ this work for additional information regarding copyright ownership.
+ ~ The ASF licenses this file to You under the Apache License, Version 2.0
+ ~ (the "License"); you may not use this file except in compliance with
+ ~ the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<sql-parser-test-cases>
+ <alter-foreign-table sql-case-id="alter_foreign_table_add_column_options"
/>
+ <alter-foreign-table sql-case-id="alter_foreign_table_add_column_not_null"
/>
+ <alter-foreign-table sql-case-id="alter_foreign_table_add_column_integer"
/>
+ <alter-foreign-table sql-case-id="alter_foreign_table_alter_column_set" />
+ <alter-foreign-table sql-case-id="alter_foreign_table_alter_column_drop" />
+ <alter-foreign-table
sql-case-id="alter_foreign_table_alter_column_option_add" />
+ <alter-foreign-table
sql-case-id="alter_foreign_table_alter_column_option_set" />
+ <alter-foreign-table sql-case-id="alter_foreign_table_alter_set_data" />
+ <alter-foreign-table sql-case-id="alter_foreign_table_alter_column_char" />
+ <alter-foreign-table
sql-case-id="alter_foreign_table_drop_column_if_exists" />
+ <alter-foreign-table sql-case-id="alter_foreign_table_drop_column" />
+ <alter-foreign-table
sql-case-id="alter_foreign_table_drop_constraint_if_exists" />
+ <alter-foreign-table sql-case-id="alter_foreign_table_drop_constraint" />
+ <alter-foreign-table sql-case-id="alter_foreign_table_options_drop_set" />
+ <alter-foreign-table sql-case-id="alter_foreign_table_owner" />
+ <alter-foreign-table sql-case-id="alter_foreign_table_rename" />
+ <alter-foreign-table sql-case-id="alter_foreign_table_set_schema" />
+ <alter-foreign-table sql-case-id="alter_foreign_table_add_constraint" />
+ <alter-foreign-table sql-case-id="alter_foreign_table_set_not_null" />
+ <alter-foreign-table sql-case-id="alter_foreign_table_disable_trigger" />
+ <alter-foreign-table sql-case-id="alter_foreign_table_enable_trigger" />
+ <alter-foreign-table sql-case-id="alter_foreign_table_rename_a_to_b" />
+ <alter-foreign-table
sql-case-id="alter_foreign_table_add_column_options_p1" />
+ <alter-foreign-table sql-case-id="alter_foreign_table_add_column_default"
/>
+ <alter-foreign-table
sql-case-id="alter_foreign_table_add_constraint_no_valid" />
+ <alter-foreign-table sql-case-id="alter_foreign_table_add_primary" />
+ <alter-foreign-table
sql-case-id="alter_foreign_table_alter_column_set_number" />
+ <alter-foreign-table
sql-case-id="alter_foreign_table_alter_column_set_statistics" />
+ <alter-foreign-table sql-case-id="alter_foreign_table_alter_column_c4" />
+ <alter-foreign-table
sql-case-id="alter_foreign_table_alter_column_drop_default" />
+ <alter-foreign-table sql-case-id="alter_foreign_table_alter_column_c6" />
+ <alter-foreign-table
sql-case-id="alter_foreign_table_alter_column_c7_drop_not_null" />
+ <alter-foreign-table
sql-case-id="alter_foreign_table_alter_column_c7_options_add_add" />
+ <alter-foreign-table sql-case-id="alter_foreign_table_alter_c8_set_drop" />
+ <alter-foreign-table
sql-case-id="alter_foreign_table_alter_c8_set_data_type_integer" />
+ <alter-foreign-table
sql-case-id="alter_foreign_table_alter_c8_set_data_type_text" />
+ <alter-foreign-table
sql-case-id="alter_foreign_table_alter_c8_set_statistics" />
+ <alter-foreign-table
sql-case-id="alter_foreign_table_alter_c8_set_storage_plain" />
+ <alter-foreign-table sql-case-id="alter_foreign_table_alter_c8_type_using"
/>
+ <alter-foreign-table sql-case-id="alter_foreign_table_alter_c8_type_char"
/>
+ <alter-foreign-table
sql-case-id="alter_foreign_table_alter_column_options_add_v1" />
+ <alter-foreign-table
sql-case-id="alter_foreign_table_alter_constraint_deferrable" />
+ <alter-foreign-table sql-case-id="alter_foreign_table_drop_if_exists" />
+ <alter-foreign-table sql-case-id="alter_foreign_table_drop_column_c9" />
+ <alter-foreign-table
sql-case-id="alter_foreign_table_drop_constraint_no_const" />
+ <alter-foreign-table sql-case-id="alter_foreign_table_drop_constraint_ft1"
/>
+ <alter-foreign-table sql-case-id="alter_foreign_table_drop_constraint_no"
/>
+ <alter-foreign-table
sql-case-id="alter_foreign_table_options_drop_delimiter_set" />
+ <alter-foreign-table sql-case-id="alter_foreign_table_owner_to_regress" />
+ <alter-foreign-table sql-case-id="alter_foreign_table_set_schema_foreign"
/>
+ <alter-foreign-table sql-case-id="alter_foreign_table_set_tablespace" />
+ <alter-foreign-table
sql-case-id="alter_foreign_table_add_constraint_check" />
+ <alter-foreign-table sql-case-id="alter_foreign_table_inherit" />
+</sql-parser-test-cases>
diff --git
a/shardingsphere-test/shardingsphere-parser-test/src/main/resources/sql/supported/ddl/alter-foreign-table.xml
b/shardingsphere-test/shardingsphere-parser-test/src/main/resources/sql/supported/ddl/alter-foreign-table.xml
new file mode 100644
index 0000000..977b7ba
--- /dev/null
+++
b/shardingsphere-test/shardingsphere-parser-test/src/main/resources/sql/supported/ddl/alter-foreign-table.xml
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one or more
+ ~ contributor license agreements. See the NOTICE file distributed with
+ ~ this work for additional information regarding copyright ownership.
+ ~ The ASF licenses this file to You under the Apache License, Version 2.0
+ ~ (the "License"); you may not use this file except in compliance with
+ ~ the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<sql-cases>
+ <sql-case id="alter_foreign_table_add_column_options" value="ALTER FOREIGN
TABLE IF EXISTS doesnt_exist_ft1 ADD COLUMN c10 integer OPTIONS (p1
'v1');" db-types="PostgreSQL,openGauss"/>
+ <sql-case id="alter_foreign_table_add_column_not_null" value="ALTER
FOREIGN TABLE IF EXISTS doesnt_exist_ft1 ADD COLUMN c7 integer NOT NULL;"
db-types="PostgreSQL,openGauss"/>
+ <sql-case id="alter_foreign_table_add_column_integer" value="ALTER FOREIGN
TABLE IF EXISTS doesnt_exist_ft1 ADD COLUMN c8 integer;"
db-types="PostgreSQL,openGauss"/>
+ <sql-case id="alter_foreign_table_alter_column_set" value="ALTER FOREIGN
TABLE IF EXISTS doesnt_exist_ft1 ALTER COLUMN c6 SET NOT NULL;"
db-types="PostgreSQL,openGauss"/>
+ <sql-case id="alter_foreign_table_alter_column_drop" value="ALTER FOREIGN
TABLE IF EXISTS doesnt_exist_ft1 ALTER COLUMN c7 DROP NOT NULL;"
db-types="PostgreSQL,openGauss"/>
+ <sql-case id="alter_foreign_table_alter_column_option_add" value="ALTER
FOREIGN TABLE IF EXISTS doesnt_exist_ft1 ALTER COLUMN c7 OPTIONS (ADD p1
'v1', ADD p2 'v2'),ALTER COLUMN c8 OPTIONS (ADD p1
'v1', ADD p2 'v2');" db-types="PostgreSQL,openGauss"/>
+ <sql-case id="alter_foreign_table_alter_column_option_set" value="ALTER
FOREIGN TABLE IF EXISTS doesnt_exist_ft1 ALTER COLUMN c8 OPTIONS (SET p2
'V2', DROP p1);" db-types="PostgreSQL,openGauss"/>
+ <sql-case id="alter_foreign_table_alter_set_data" value="ALTER FOREIGN
TABLE IF EXISTS doesnt_exist_ft1 ALTER COLUMN c8 SET DATA TYPE text;"
db-types="PostgreSQL,openGauss"/>
+ <sql-case id="alter_foreign_table_alter_column_char" value="ALTER FOREIGN
TABLE IF EXISTS doesnt_exist_ft1 ALTER COLUMN c8 TYPE char(10);"
db-types="PostgreSQL,openGauss"/>
+ <sql-case id="alter_foreign_table_drop_column_if_exists" value="ALTER
FOREIGN TABLE IF EXISTS doesnt_exist_ft1 DROP COLUMN IF EXISTS no_column;"
db-types="PostgreSQL,openGauss"/>
+ <sql-case id="alter_foreign_table_drop_column" value="ALTER FOREIGN TABLE
IF EXISTS doesnt_exist_ft1 DROP COLUMN c9;" db-types="PostgreSQL,openGauss"/>
+ <sql-case id="alter_foreign_table_drop_constraint_if_exists" value="ALTER
FOREIGN TABLE IF EXISTS doesnt_exist_ft1 DROP CONSTRAINT IF EXISTS no_const;"
db-types="PostgreSQL,openGauss"/>
+ <sql-case id="alter_foreign_table_drop_constraint" value="ALTER FOREIGN
TABLE IF EXISTS doesnt_exist_ft1 DROP CONSTRAINT ft1_c1_check;"
db-types="PostgreSQL,openGauss"/>
+ <sql-case id="alter_foreign_table_options_drop_set" value="ALTER FOREIGN
TABLE IF EXISTS doesnt_exist_ft1 OPTIONS (DROP delimiter, SET quote
'~', ADD escape '@');" db-types="PostgreSQL,openGauss"/>
+ <sql-case id="alter_foreign_table_owner" value="ALTER FOREIGN TABLE IF
EXISTS doesnt_exist_ft1 OWNER TO regress_test_role;"
db-types="PostgreSQL,openGauss"/>
+ <sql-case id="alter_foreign_table_rename" value="ALTER FOREIGN TABLE IF
EXISTS doesnt_exist_ft1 RENAME TO foreign_table_1;"
db-types="PostgreSQL,openGauss"/>
+ <sql-case id="alter_foreign_table_set_schema" value="ALTER FOREIGN TABLE
IF EXISTS doesnt_exist_ft1 SET SCHEMA foreign_schema;"
db-types="PostgreSQL,openGauss"/>
+ <sql-case id="alter_foreign_table_add_constraint" value="ALTER FOREIGN
TABLE fd_pt2_1 ADD CONSTRAINT fd_pt2chk1 CHECK (c1 > 0);"
db-types="PostgreSQL,openGauss"/>
+ <sql-case id="alter_foreign_table_set_not_null" value="ALTER FOREIGN TABLE
fd_pt2_1 ALTER c2 SET NOT NULL;" db-types="PostgreSQL,openGauss"/>
+ <sql-case id="alter_foreign_table_disable_trigger" value="ALTER FOREIGN
TABLE foreign_schema.foreign_table_1 DISABLE TRIGGER
trigtest_before_stmt;" db-types="PostgreSQL,openGauss"/>
+ <sql-case id="alter_foreign_table_enable_trigger" value="ALTER FOREIGN
TABLE foreign_schema.foreign_table_1 ENABLE TRIGGER
trigtest_before_stmt;" db-types="PostgreSQL,openGauss"/>
+ <sql-case id="alter_foreign_table_rename_a_to_b" value="ALTER FOREIGN
TABLE foreign_schema.ft1 RENAME c1 TO foreign_column_1;"
db-types="PostgreSQL,openGauss"/>
+ <sql-case id="alter_foreign_table_add_column_options_p1" value="ALTER
FOREIGN TABLE ft1 ADD COLUMN c10 integer OPTIONS (p1 'v1');"
db-types="PostgreSQL,openGauss"/>
+ <sql-case id="alter_foreign_table_add_column_default" value="ALTER FOREIGN
TABLE ft1 ADD COLUMN c5 integer DEFAULT 0;" db-types="PostgreSQL,openGauss"/>
+ <sql-case id="alter_foreign_table_add_constraint_no_valid" value="ALTER
FOREIGN TABLE ft1 ADD CONSTRAINT ft1_c9_check CHECK (c9 < 0) NOT VALID;"
db-types="PostgreSQL,openGauss"/>
+ <sql-case id="alter_foreign_table_add_primary" value="ALTER FOREIGN TABLE
ft1 ADD PRIMARY KEY (c7);" db-types="PostgreSQL,openGauss"/>
+ <sql-case id="alter_foreign_table_alter_column_set_number" value="ALTER
FOREIGN TABLE ft1 ALTER COLUMN c1 SET (n_distinct = 100);"
db-types="PostgreSQL,openGauss"/>
+ <sql-case id="alter_foreign_table_alter_column_set_statistics"
value="ALTER FOREIGN TABLE ft1 ALTER COLUMN c1 SET STATISTICS 10000;"
db-types="PostgreSQL,openGauss"/>
+ <sql-case id="alter_foreign_table_alter_column_c4" value="ALTER FOREIGN
TABLE ft1 ALTER COLUMN c4 SET DEFAULT 0;" db-types="PostgreSQL,openGauss"/>
+ <sql-case id="alter_foreign_table_alter_column_drop_default" value="ALTER
FOREIGN TABLE ft1 ALTER COLUMN c5 DROP DEFAULT;"
db-types="PostgreSQL,openGauss"/>
+ <sql-case id="alter_foreign_table_alter_column_c6" value="ALTER FOREIGN
TABLE ft1 ALTER COLUMN c6 SET NOT NULL;" db-types="PostgreSQL,openGauss"/>
+ <sql-case id="alter_foreign_table_alter_column_c7_drop_not_null"
value="ALTER FOREIGN TABLE ft1 ALTER COLUMN c7 DROP NOT NULL;"
db-types="PostgreSQL,openGauss"/>
+ <sql-case id="alter_foreign_table_alter_column_c7_options_add_add"
value="ALTER FOREIGN TABLE ft1 ALTER COLUMN c7 OPTIONS (ADD p1 'v1',
ADD p2 'v2'),ALTER COLUMN c8 OPTIONS (ADD p1 'v1', ADD p2
'v2');" db-types="PostgreSQL,openGauss"/>
+ <sql-case id="alter_foreign_table_alter_c8_set_drop" value="ALTER FOREIGN
TABLE ft1 ALTER COLUMN c8 OPTIONS (SET p2 'V2', DROP p1);"
db-types="PostgreSQL,openGauss"/>
+ <sql-case id="alter_foreign_table_alter_c8_set_data_type_integer"
value="ALTER FOREIGN TABLE ft1 ALTER COLUMN c8 SET DATA TYPE integer;"
db-types="PostgreSQL,openGauss"/>
+ <sql-case id="alter_foreign_table_alter_c8_set_data_type_text"
value="ALTER FOREIGN TABLE ft1 ALTER COLUMN c8 SET DATA TYPE text;"
db-types="PostgreSQL,openGauss"/>
+ <sql-case id="alter_foreign_table_alter_c8_set_statistics" value="ALTER
FOREIGN TABLE ft1 ALTER COLUMN c8 SET STATISTICS -1;"
db-types="PostgreSQL,openGauss"/>
+ <sql-case id="alter_foreign_table_alter_c8_set_storage_plain" value="ALTER
FOREIGN TABLE ft1 ALTER COLUMN c8 SET STORAGE PLAIN;"
db-types="PostgreSQL,openGauss"/>
+ <sql-case id="alter_foreign_table_alter_c8_type_using" value="ALTER
FOREIGN TABLE ft1 ALTER COLUMN c8 TYPE char(10) USING '0';"
db-types="PostgreSQL,openGauss"/>
+ <sql-case id="alter_foreign_table_alter_c8_type_char" value="ALTER FOREIGN
TABLE ft1 ALTER COLUMN c8 TYPE char(10);" db-types="PostgreSQL,openGauss"/>
+ <sql-case id="alter_foreign_table_alter_column_options_add_v1"
value="ALTER FOREIGN TABLE ft1 ALTER COLUMN xmin OPTIONS (ADD p1
'v1');" db-types="PostgreSQL,openGauss"/>
+ <sql-case id="alter_foreign_table_alter_constraint_deferrable"
value="ALTER FOREIGN TABLE ft1 ALTER CONSTRAINT ft1_c9_check DEFERRABLE;"
db-types="PostgreSQL,openGauss"/>
+ <sql-case id="alter_foreign_table_drop_if_exists" value="ALTER FOREIGN
TABLE ft1 DROP COLUMN IF EXISTS no_column;" db-types="PostgreSQL,openGauss"/>
+ <sql-case id="alter_foreign_table_drop_column_c9" value="ALTER FOREIGN
TABLE ft1 DROP COLUMN c9;" db-types="PostgreSQL,openGauss"/>
+ <sql-case id="alter_foreign_table_drop_constraint_no_const" value="ALTER
FOREIGN TABLE ft1 DROP CONSTRAINT IF EXISTS no_const;"
db-types="PostgreSQL,openGauss"/>
+ <sql-case id="alter_foreign_table_drop_constraint_ft1" value="ALTER
FOREIGN TABLE ft1 DROP CONSTRAINT ft1_c9_check;"
db-types="PostgreSQL,openGauss"/>
+ <sql-case id="alter_foreign_table_drop_constraint_no" value="ALTER FOREIGN
TABLE ft1 DROP CONSTRAINT no_const;" db-types="PostgreSQL,openGauss"/>
+ <sql-case id="alter_foreign_table_options_drop_delimiter_set" value="ALTER
FOREIGN TABLE ft1 OPTIONS (DROP delimiter, SET quote '~', ADD escape
'@');" db-types="PostgreSQL,openGauss"/>
+ <sql-case id="alter_foreign_table_owner_to_regress" value="ALTER FOREIGN
TABLE ft1 OWNER TO regress_test_role;" db-types="PostgreSQL,openGauss"/>
+ <sql-case id="alter_foreign_table_set_schema_foreign" value="ALTER FOREIGN
TABLE ft1 SET SCHEMA foreign_schema;" db-types="PostgreSQL,openGauss"/>
+ <sql-case id="alter_foreign_table_set_tablespace" value="ALTER FOREIGN
TABLE ft1 SET TABLESPACE ts;" db-types="PostgreSQL,openGauss"/>
+ <sql-case id="alter_foreign_table_add_constraint_check" value="ALTER
FOREIGN TABLE ft2 ADD CONSTRAINT fd_pt1chk2 CHECK (c2 <> '');"
db-types="PostgreSQL,openGauss"/>
+ <sql-case id="alter_foreign_table_inherit" value="ALTER FOREIGN TABLE ft2
INHERIT fd_pt1;" db-types="PostgreSQL,openGauss"/>
+</sql-cases>
diff --git
a/shardingsphere-test/shardingsphere-parser-test/src/main/resources/sql/unsupported/unsupported.xml
b/shardingsphere-test/shardingsphere-parser-test/src/main/resources/sql/unsupported/unsupported.xml
index ee969cf..27bf5cd 100644
---
a/shardingsphere-test/shardingsphere-parser-test/src/main/resources/sql/unsupported/unsupported.xml
+++
b/shardingsphere-test/shardingsphere-parser-test/src/main/resources/sql/unsupported/unsupported.xml
@@ -9094,74 +9094,6 @@
<sql-case id="low_xa_by_mysql_source_test_case8" value="xa start
0x7465737462, 0x2030405060, 0xb" db-types="MySQL"/>
<sql-case id="low_xa_by_mysql_source_test_case9" value="xa start
0xABCDEF1234567890, 0x01, 0x02" db-types="MySQL"/>
<sql-case id="table_union" value="TABLE T1 UNION TABLE T2"
db-types="MySQL"/>
- <sql-case id="alter_by_postgresql_source_test_case59" value="ALTER FOREIGN
TABLE IF EXISTS doesnt_exist_ft1 ADD COLUMN c10 integer OPTIONS (p1
'v1');" db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case60" value="ALTER FOREIGN
TABLE IF EXISTS doesnt_exist_ft1 ADD COLUMN c4 integer;" db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case61" value="ALTER FOREIGN
TABLE IF EXISTS doesnt_exist_ft1 ADD COLUMN c6 integer;" db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case62" value="ALTER FOREIGN
TABLE IF EXISTS doesnt_exist_ft1 ADD COLUMN c7 integer NOT NULL;"
db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case63" value="ALTER FOREIGN
TABLE IF EXISTS doesnt_exist_ft1 ADD COLUMN c8 integer;" db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case64" value="ALTER FOREIGN
TABLE IF EXISTS doesnt_exist_ft1 ADD COLUMN c9 integer;" db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case65" value="ALTER FOREIGN
TABLE IF EXISTS doesnt_exist_ft1 ALTER COLUMN c6 SET NOT NULL;"
db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case66" value="ALTER FOREIGN
TABLE IF EXISTS doesnt_exist_ft1 ALTER COLUMN c7 DROP NOT NULL;"
db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case67" value="ALTER FOREIGN
TABLE IF EXISTS doesnt_exist_ft1 ALTER COLUMN c7 OPTIONS (ADD p1
'v1', ADD p2 'v2'), ALTER COLUMN c8
OPTIONS (ADD p1 'v1', ADD p2 'v2');" db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case68" value="ALTER FOREIGN
TABLE IF EXISTS doesnt_exist_ft1 ALTER COLUMN c8 OPTIONS (SET p2
'V2', DROP p1);" db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case69" value="ALTER FOREIGN
TABLE IF EXISTS doesnt_exist_ft1 ALTER COLUMN c8 SET DATA TYPE text;"
db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case70" value="ALTER FOREIGN
TABLE IF EXISTS doesnt_exist_ft1 ALTER COLUMN c8 TYPE char(10);"
db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case71" value="ALTER FOREIGN
TABLE IF EXISTS doesnt_exist_ft1 DROP COLUMN IF EXISTS no_column;"
db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case72" value="ALTER FOREIGN
TABLE IF EXISTS doesnt_exist_ft1 DROP COLUMN c9;" db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case73" value="ALTER FOREIGN
TABLE IF EXISTS doesnt_exist_ft1 DROP CONSTRAINT IF EXISTS no_const;"
db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case74" value="ALTER FOREIGN
TABLE IF EXISTS doesnt_exist_ft1 DROP CONSTRAINT ft1_c1_check;"
db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case75" value="ALTER FOREIGN
TABLE IF EXISTS doesnt_exist_ft1 OPTIONS (DROP delimiter, SET quote
'~', ADD escape '@');" db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case76" value="ALTER FOREIGN
TABLE IF EXISTS doesnt_exist_ft1 OWNER TO regress_test_role;"
db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case77" value="ALTER FOREIGN
TABLE IF EXISTS doesnt_exist_ft1 RENAME TO foreign_table_1;"
db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case78" value="ALTER FOREIGN
TABLE IF EXISTS doesnt_exist_ft1 RENAME c1 TO foreign_column_1;"
db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case79" value="ALTER FOREIGN
TABLE IF EXISTS doesnt_exist_ft1 SET SCHEMA foreign_schema;"
db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case80" value="ALTER FOREIGN
TABLE fd_pt2_1 ADD CONSTRAINT fd_pt2chk1 CHECK (c1 > 0);"
db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case81" value="ALTER FOREIGN
TABLE fd_pt2_1 ALTER c2 SET NOT NULL;" db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case82" value="ALTER FOREIGN
TABLE foreign_schema.foreign_table_1 DISABLE TRIGGER trigtest_before_stmt;"
db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case83" value="ALTER FOREIGN
TABLE foreign_schema.foreign_table_1 ENABLE TRIGGER trigtest_before_stmt;"
db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case84" value="ALTER FOREIGN
TABLE foreign_schema.ft1 RENAME TO foreign_table_1;" db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case85" value="ALTER FOREIGN
TABLE foreign_schema.ft1 RENAME c1 TO foreign_column_1;" db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case86" value="ALTER FOREIGN
TABLE ft1 ADD COLUMN c10 integer OPTIONS (p1 'v1');"
db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case87" value="ALTER FOREIGN
TABLE ft1 ADD COLUMN c4 integer;" db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case88" value="ALTER FOREIGN
TABLE ft1 ADD COLUMN c5 integer DEFAULT 0;" db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case89" value="ALTER FOREIGN
TABLE ft1 ADD COLUMN c6 integer;" db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case90" value="ALTER FOREIGN
TABLE ft1 ADD COLUMN c7 integer NOT NULL;" db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case91" value="ALTER FOREIGN
TABLE ft1 ADD COLUMN c8 integer DEFAULT 0;" db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case92" value="ALTER FOREIGN
TABLE ft1 ADD COLUMN c8 integer;" db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case93" value="ALTER FOREIGN
TABLE ft1 ADD COLUMN c9 integer;" db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case94" value="ALTER FOREIGN
TABLE ft1 ADD CONSTRAINT ft1_c9_check CHECK (c9 < 0) NOT VALID;"
db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case95" value="ALTER FOREIGN
TABLE ft1 ADD PRIMARY KEY (c7);" db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case96" value="ALTER FOREIGN
TABLE ft1 ALTER COLUMN c1 SET (n_distinct = 100);" db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case97" value="ALTER FOREIGN
TABLE ft1 ALTER COLUMN c1 SET STATISTICS 10000;" db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case98" value="ALTER FOREIGN
TABLE ft1 ALTER COLUMN c4 SET DEFAULT 0;" db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case99" value="ALTER FOREIGN
TABLE ft1 ALTER COLUMN c5 DROP DEFAULT;" db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case100" value="ALTER
FOREIGN TABLE ft1 ALTER COLUMN c6 SET NOT NULL;" db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case101" value="ALTER
FOREIGN TABLE ft1 ALTER COLUMN c7 DROP NOT NULL;" db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case102" value="ALTER
FOREIGN TABLE ft1 ALTER COLUMN c7 OPTIONS (ADD p1 'v1', ADD p2
'v2'), ALTER COLUMN c8 OPTIONS (ADD p1
'v1', ADD p2 'v2');" db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case103" value="ALTER
FOREIGN TABLE ft1 ALTER COLUMN c8 OPTIONS (SET p2 'V2', DROP p1);"
db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case104" value="ALTER
FOREIGN TABLE ft1 ALTER COLUMN c8 SET DATA TYPE integer; -- ERROR DROP
TABLE use_ft1_column_type;" db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case105" value="ALTER
FOREIGN TABLE ft1 ALTER COLUMN c8 SET DATA TYPE text;" db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case106" value="ALTER
FOREIGN TABLE ft1 ALTER COLUMN c8 SET STATISTICS -1;" db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case107" value="ALTER
FOREIGN TABLE ft1 ALTER COLUMN c8 SET STORAGE PLAIN;" db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case108" value="ALTER
FOREIGN TABLE ft1 ALTER COLUMN c8 TYPE char(10) USING '0';"
db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case109" value="ALTER
FOREIGN TABLE ft1 ALTER COLUMN c8 TYPE char(10);" db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case110" value="ALTER
FOREIGN TABLE ft1 ALTER COLUMN c8 TYPE char(10);" db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case111" value="ALTER
FOREIGN TABLE ft1 ALTER COLUMN xmin OPTIONS (ADD p1 'v1');"
db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case112" value="ALTER
FOREIGN TABLE ft1 ALTER CONSTRAINT ft1_c9_check DEFERRABLE;"
db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case113" value="ALTER
FOREIGN TABLE ft1 DROP COLUMN IF EXISTS no_column;" db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case114" value="ALTER
FOREIGN TABLE ft1 DROP COLUMN c9;" db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case115" value="ALTER
FOREIGN TABLE ft1 DROP COLUMN no_column;" db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case116" value="ALTER
FOREIGN TABLE ft1 DROP CONSTRAINT IF EXISTS no_const;" db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case117" value="ALTER
FOREIGN TABLE ft1 DROP CONSTRAINT ft1_c9_check;" db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case118" value="ALTER
FOREIGN TABLE ft1 DROP CONSTRAINT no_const;" db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case119" value="ALTER
FOREIGN TABLE ft1 OPTIONS (DROP delimiter, SET quote '~', ADD escape
'@');" db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case120" value="ALTER
FOREIGN TABLE ft1 OWNER TO regress_test_role;" db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case121" value="ALTER
FOREIGN TABLE ft1 SET SCHEMA foreign_schema;" db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case122" value="ALTER
FOREIGN TABLE ft1 SET TABLESPACE ts;" db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case123" value="ALTER
FOREIGN TABLE ft2 ADD CONSTRAINT fd_pt1chk2 CHECK (c2 <> '');"
db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case124" value="ALTER
FOREIGN TABLE ft2 INHERIT fd_pt1;" db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case125" value="ALTER
FOREIGN TABLE ft2 INHERIT fd_pt1;" db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case126" value="ALTER
FOREIGN TABLE ft2 INHERIT fd_pt1;" db-types="PostgreSQL"/>
<sql-case id="alter_by_postgresql_source_test_case127" value="ALTER GROUP
regress_priv_group1 ADD USER regress_priv_user4;" db-types="PostgreSQL"/>
<sql-case id="alter_by_postgresql_source_test_case128" value="ALTER GROUP
regress_priv_group2 ADD USER regress_priv_user2; -- duplicate ALTER GROUP
regress_priv_group2 DROP USER regress_priv_user2;" db-types="PostgreSQL"/>
<sql-case id="alter_by_postgresql_source_test_case129" value="ALTER
MATERIALIZED VIEW compressmv ALTER COLUMN x SET COMPRESSION lz4;"
db-types="PostgreSQL"/>
@@ -10497,7 +10429,6 @@
<sql-case id="create_by_postgresql_source_test_case865" value="CREATE
TRIGGER modified_any BEFORE UPDATE OF a ON main_table FOR EACH ROW WHEN (OLD.*
IS DISTINCT FROM NEW.*) EXECUTE PROCEDURE
trigger_func('modified_any');" db-types="PostgreSQL"/>
<sql-case id="create_by_postgresql_source_test_case866" value="CREATE TYPE
city_budget ( internallength = 16, input = int44in, output = int44out,
element = int4, category = 'x' preferred = tr );"
db-types="PostgreSQL"/>
<sql-case id="create_by_postgresql_source_test_case867" value="CREATE TYPE
hash_test_t2 AS (a money, b text);" db-types="PostgreSQL"/>
- <sql-case id="create_by_postgresql_source_test_case868" value="CREATE TYPE
myvarchar ( input = myvarcharin, output = myvarcharout, alignment =
integer, storage = main );" db-types="PostgreSQL"/>
<sql-case id="create_by_postgresql_source_test_case869" value="CREATE TYPE
tt_t0 AS (z inet, x int, y numeric(8,2));" db-types="PostgreSQL"/>
<sql-case id="create_by_postgresql_source_test_case870" value="CREATE VIEW
atest12sbv WITH (security_barrier=true) AS SELECT * FROM atest12 WHERE b
<<< 5;" db-types="PostgreSQL"/>
<sql-case id="create_by_postgresql_source_test_case871" value="CREATE VIEW
atest12v AS SELECT * FROM atest12 WHERE b <<< 5;"
db-types="PostgreSQL"/>
@@ -13962,7 +13893,6 @@
<sql-case id="low_create_by_postgresql_source_test_case554" value="create
type testtype4 as (a int, b point);" db-types="PostgreSQL"/>
<sql-case id="low_create_by_postgresql_source_test_case555" value="create
type testtype6 as (a int, b point);" db-types="PostgreSQL"/>
<sql-case id="low_create_by_postgresql_source_test_case556" value="create
type testtype6 as (a int, b point);" db-types="PostgreSQL"/>
- <sql-case id="low_create_by_postgresql_source_test_case557" value="create
unique index plain on insertconflicttest(key);" db-types="PostgreSQL"/>
<sql-case id="low_create_by_postgresql_source_test_case558" value="create
view insertconflictv as select * from insertconflict with cascaded check
option;" db-types="PostgreSQL"/>
<sql-case id="low_create_by_postgresql_source_test_case559" value="create
view tt201v as select extract(day from now()) as extr, (now(), '1
day'::interval) overlaps (current_timestamp(2), '1
day'::interval) as o, 'foo' is normalized isn,
'foo' is nfkc normalized isnn, normalize('foo') as n,
normalize('foo', nfkd) as nfkd, overlay('foo' placing
'bar' from 2) as ovl, overlay('foo&ap [...]
<sql-case id="low_create_by_postgresql_source_test_case560" value="create
view tt26v as select x + y + z as c1, (x * y) + z as c2, x + (y *
z) as c3, (x + y) * z as c4, x * (y + z) as c5, x + (y +
z) as c6, x + (y # z) as c7, (x > y) AND (y > z OR x >
z) as c8, (x > y) OR (y > z AND NOT (x > z)) as c9,
(x,y) <> ALL (values(1,2),(3,4)) as c10, (x,y) <= ANY
(values(1,2),(3,4)) as c11 from ( [...]
@@ -14030,7 +13960,6 @@
<sql-case id="low_drop_by_postgresql_source_test_case13" value="drop
function ();" db-types="PostgreSQL"/>
<sql-case id="low_drop_by_postgresql_source_test_case14" value="drop
function 314159();" db-types="PostgreSQL"/>
<sql-case id="low_drop_by_postgresql_source_test_case15" value="drop index
314159;" db-types="PostgreSQL"/>
- <sql-case id="low_drop_by_postgresql_source_test_case16" value="drop index
plain;" db-types="PostgreSQL"/>
<sql-case id="low_drop_by_postgresql_source_test_case17" value="drop
index;" db-types="PostgreSQL"/>
<sql-case id="low_drop_by_postgresql_source_test_case18" value="drop
instance rule nonesuch on noplace;" db-types="PostgreSQL"/>
<sql-case id="low_drop_by_postgresql_source_test_case19" value="drop
materialized view mvtest_error;" db-types="PostgreSQL"/>