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 2e45904 Support alter foregin data wrapper for postgresql (#14897)
2e45904 is described below
commit 2e4590487c61f60906f509e9990132a10af4c7d2
Author: tuichenchuxin <[email protected]>
AuthorDate: Thu Jan 20 15:31:12 2022 +0800
Support alter foregin data wrapper for postgresql (#14897)
* support alter foreign data wrapper for postgresql
* fix case name
---
.../sql/parser/autogen/PostgreSQLStatement.g4 | 1 +
.../impl/PostgreSQLDDLStatementSQLVisitor.java | 7 +++++
.../core/database/visitor/SQLVisitorRule.java | 2 ++
...PostgreSQLAlterForeignDataWrapperStatement.java | 30 +++++++++++++++++++
.../jaxb/cases/domain/SQLParserTestCases.java | 5 ++++
.../ddl/AlterForeignDataWrapperTestCase.java | 26 +++++++++++++++++
.../case/ddl/alter-foreign-data-wrapper.xml | 34 ++++++++++++++++++++++
.../supported/ddl/alter-foreign-data-wrapper.xml | 34 ++++++++++++++++++++++
.../main/resources/sql/unsupported/unsupported.xml | 28 ------------------
9 files changed, 139 insertions(+), 28 deletions(-)
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 fe9e23a..3b2f610 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
@@ -59,6 +59,7 @@ execute
| alterDatabase
| alterDomain
| alterDefaultPrivileges
+ | alterForeignDataWrapper
| 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 e8e27ed..177da05 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
@@ -41,6 +41,7 @@ import
org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.Al
import
org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.AlterTextSearchDictionaryContext;
import
org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.AlterTextSearchParserContext;
import
org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.AlterTextSearchTemplateContext;
+import
org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.AlterForeignDataWrapperContext;
import
org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.AlterViewContext;
import
org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.ColumnConstraintContext;
import
org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.ColumnDefinitionContext;
@@ -122,6 +123,7 @@ import
org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.ddl
import
org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.ddl.PostgreSQLAlterCollationStatement;
import
org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.ddl.PostgreSQLAlterConversionStatement;
import
org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.ddl.PostgreSQLAlterDefaultPrivilegesStatement;
+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.PostgreSQLAlterFunctionStatement;
@@ -257,6 +259,11 @@ public final class PostgreSQLDDLStatementSQLVisitor
extends PostgreSQLStatementS
return new PostgreSQLAlterDefaultPrivilegesStatement();
}
+ @Override
+ public ASTNode visitAlterForeignDataWrapper(final
AlterForeignDataWrapperContext ctx) {
+ return new PostgreSQLAlterForeignDataWrapperStatement();
+ }
+
@SuppressWarnings("unchecked")
@Override
public ASTNode visitAlterDefinitionClause(final
AlterDefinitionClauseContext ctx) {
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 47d69d6..e7a5d01 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
@@ -56,6 +56,8 @@ public enum SQLVisitorRule {
ALTER_DEFAULT_PRIVILEGES("AlterDefaultPrivileges", SQLStatementType.DDL),
+ ALTER_FOREIGN_DATA_WRAPPER("AlterForeignDataWrapper",
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/dialect/statement/postgresql/ddl/PostgreSQLAlterForeignDataWrapperStatement.java
b/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/dialect/statement/postgresql/ddl/PostgreSQLAlterForeignDataWrapperStatement.java
new file mode 100644
index 0000000..17e0fe9
--- /dev/null
+++
b/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/dialect/statement/postgresql/ddl/PostgreSQLAlterForeignDataWrapperStatement.java
@@ -0,0 +1,30 @@
+/*
+ * 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.AbstractSQLStatement;
+import
org.apache.shardingsphere.sql.parser.sql.common.statement.ddl.DDLStatement;
+import
org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.PostgreSQLStatement;
+
+/**
+ * PostgreSQL alter foreign data wrapper statement.
+ */
+@ToString
+public final class PostgreSQLAlterForeignDataWrapperStatement extends
AbstractSQLStatement implements DDLStatement, 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 4f38b8a..543bad4 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
@@ -95,6 +95,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.AlterDefaultPrivilegesTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl.AlterDimensionStatementTestCase;
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.AlterFunctionStatementTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl.AlterIndexStatementTestCase;
@@ -1014,6 +1015,9 @@ public final class SQLParserTestCases {
@XmlElement(name = "alter-default-privileges")
private final List<AlterDefaultPrivilegesTestCase>
alterDefaultPrivilegesTestCase = new LinkedList<>();
+ @XmlElement(name = "alter-foreign-data-wrapper")
+ private final List<AlterForeignDataWrapperTestCase>
alterForeignDataWrapperTestCase = new LinkedList<>();
+
@XmlElement(name = "create-text-search")
private final List<CreateTextSearchStatementTestCase>
createTextSearchStatementTestCases = new LinkedList<>();
@@ -1289,6 +1293,7 @@ public final class SQLParserTestCases {
putAll(alterConversionStatementTestCase, result);
putAll(alterCollationStatementTestCase, result);
putAll(alterDefaultPrivilegesTestCase, result);
+ putAll(alterForeignDataWrapperTestCase, 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/AlterForeignDataWrapperTestCase.java
b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/ddl/AlterForeignDataWrapperTestCase.java
new file mode 100644
index 0000000..301c709
--- /dev/null
+++
b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/ddl/AlterForeignDataWrapperTestCase.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 data wrapper statement test case.
+ */
+public final class AlterForeignDataWrapperTestCase extends SQLParserTestCase {
+}
diff --git
a/shardingsphere-test/shardingsphere-parser-test/src/main/resources/case/ddl/alter-foreign-data-wrapper.xml
b/shardingsphere-test/shardingsphere-parser-test/src/main/resources/case/ddl/alter-foreign-data-wrapper.xml
new file mode 100644
index 0000000..b870243
--- /dev/null
+++
b/shardingsphere-test/shardingsphere-parser-test/src/main/resources/case/ddl/alter-foreign-data-wrapper.xml
@@ -0,0 +1,34 @@
+<?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-data-wrapper
sql-case-id="alter_foreign_data_wrapper_rename" />
+ <alter-foreign-data-wrapper
sql-case-id="alter_foreign_data_wrapper_handler" />
+ <alter-foreign-data-wrapper
sql-case-id="alter_foreign_data_wrapper_multi_handler" />
+ <alter-foreign-data-wrapper
sql-case-id="alter_foreign_data_wrapper_no_validator" />
+ <alter-foreign-data-wrapper
sql-case-id="alter_foreign_data_wrapper_options_add" />
+ <alter-foreign-data-wrapper
sql-case-id="alter_foreign_data_wrapper_options_add_drop" />
+ <alter-foreign-data-wrapper
sql-case-id="alter_foreign_data_wrapper_options_drop_set_add" />
+ <alter-foreign-data-wrapper
sql-case-id="alter_foreign_data_wrapper_options_drop" />
+ <alter-foreign-data-wrapper
sql-case-id="alter_foreign_data_wrapper_options_set" />
+ <alter-foreign-data-wrapper
sql-case-id="alter_foreign_data_wrapper_options_option" />
+ <alter-foreign-data-wrapper
sql-case-id="alter_foreign_data_wrapper_options_option_defined" />
+ <alter-foreign-data-wrapper
sql-case-id="alter_foreign_data_wrapper_options_option_nonexistent" />
+ <alter-foreign-data-wrapper sql-case-id="alter_foreign_data_wrapper_owner"
/>
+ <alter-foreign-data-wrapper
sql-case-id="alter_foreign_data_wrapper_with_validator" />
+</sql-parser-test-cases>
diff --git
a/shardingsphere-test/shardingsphere-parser-test/src/main/resources/sql/supported/ddl/alter-foreign-data-wrapper.xml
b/shardingsphere-test/shardingsphere-parser-test/src/main/resources/sql/supported/ddl/alter-foreign-data-wrapper.xml
new file mode 100644
index 0000000..5539853
--- /dev/null
+++
b/shardingsphere-test/shardingsphere-parser-test/src/main/resources/sql/supported/ddl/alter-foreign-data-wrapper.xml
@@ -0,0 +1,34 @@
+<?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_data_wrapper_rename" value="ALTER FOREIGN DATA
WRAPPER alt_fdw1 RENAME TO alt_fdw2;" db-types="PostgreSQL"/>
+ <sql-case id="alter_foreign_data_wrapper_handler" value="ALTER FOREIGN
DATA WRAPPER foo HANDLER invalid_fdw_handler;" db-types="PostgreSQL"/>
+ <sql-case id="alter_foreign_data_wrapper_multi_handler" value="ALTER
FOREIGN DATA WRAPPER foo HANDLER test_fdw_handler HANDLER anything;"
db-types="PostgreSQL"/>
+ <sql-case id="alter_foreign_data_wrapper_no_validator" value="ALTER
FOREIGN DATA WRAPPER foo NO VALIDATOR;" db-types="PostgreSQL"/>
+ <sql-case id="alter_foreign_data_wrapper_options_add" value="ALTER FOREIGN
DATA WRAPPER foo OPTIONS (ADD d '5');" db-types="PostgreSQL"/>
+ <sql-case id="alter_foreign_data_wrapper_options_add_drop" value="ALTER
FOREIGN DATA WRAPPER foo OPTIONS (ADD x '1', DROP x);"
db-types="PostgreSQL"/>
+ <sql-case id="alter_foreign_data_wrapper_options_drop_set_add"
value="ALTER FOREIGN DATA WRAPPER foo OPTIONS (DROP a, SET b '3', ADD
c '4');" db-types="PostgreSQL"/>
+ <sql-case id="alter_foreign_data_wrapper_options_drop" value="ALTER
FOREIGN DATA WRAPPER foo OPTIONS (DROP c);" db-types="PostgreSQL"/>
+ <sql-case id="alter_foreign_data_wrapper_options_set" value="ALTER FOREIGN
DATA WRAPPER foo OPTIONS (SET c '4');" db-types="PostgreSQL"/>
+ <sql-case id="alter_foreign_data_wrapper_options_option" value="ALTER
FOREIGN DATA WRAPPER foo OPTIONS (a '1', b '2');"
db-types="PostgreSQL"/>
+ <sql-case id="alter_foreign_data_wrapper_options_option_defined"
value="ALTER FOREIGN DATA WRAPPER foo OPTIONS (gotcha 'true');"
db-types="PostgreSQL"/>
+ <sql-case id="alter_foreign_data_wrapper_options_option_nonexistent"
value="ALTER FOREIGN DATA WRAPPER foo OPTIONS (nonexistent 'fdw');"
db-types="PostgreSQL"/>
+ <sql-case id="alter_foreign_data_wrapper_owner" value="ALTER FOREIGN DATA
WRAPPER foo OWNER TO regress_test_role;" db-types="PostgreSQL"/>
+ <sql-case id="alter_foreign_data_wrapper_with_validator" value="ALTER
FOREIGN DATA WRAPPER foo VALIDATOR bar;" db-types="PostgreSQL"/>
+</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 e9109f9..ee969cf 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
@@ -38,7 +38,6 @@
<sql-case id="create_table_as_select" value="create table agg_data_2k as
select g from generate_series(0, 1999) g;" db-types="PostgreSQL" />
<sql-case id="create_foreign_data_wrapper" value="CREATE FOREIGN DATA
WRAPPER alt_fdw1" db-types="PostgreSQL" />
<sql-case id="create_server" value="CREATE SERVER alt_fserv1 FOREIGN DATA
WRAPPER alt_fdw1;" db-types="PostgreSQL" />
- <sql-case id="alter_foreign_data_wrapper" value="ALTER FOREIGN DATA
WRAPPER alt_fdw1 RENAME TO alt_fdw2;" db-types="PostgreSQL" />
<sql-case id="create_operator" value="CREATE OPERATOR @-@ ( leftarg =
int4, rightarg = int4, procedure = int4mi )" db-types="PostgreSQL" />
<sql-case id="alter_operator" value="ALTER OPERATOR @+@(int4, int4) OWNER
TO regress_alter_generic_user2" db-types="PostgreSQL" />
<sql-case id="create_statistics" value="CREATE STATISTICS alt_stat1 ON a,
b FROM alt_regress_1" db-types="PostgreSQL" />
@@ -9095,33 +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_case32" value="ALTER FOREIGN
DATA WRAPPER alt_fdw1 RENAME TO alt_fdw2;" db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case33" value="ALTER FOREIGN
DATA WRAPPER alt_fdw1 RENAME TO alt_fdw3;" db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case34" value="ALTER FOREIGN
DATA WRAPPER foo HANDLER invalid_fdw_handler;" db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case35" value="ALTER FOREIGN
DATA WRAPPER foo HANDLER test_fdw_handler HANDLER anything;"
db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case36" value="ALTER FOREIGN
DATA WRAPPER foo HANDLER test_fdw_handler;" db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case37" value="ALTER FOREIGN
DATA WRAPPER foo NO VALIDATOR;" db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case38" value="ALTER FOREIGN
DATA WRAPPER foo OPTIONS (ADD d '5');" db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case39" value="ALTER FOREIGN
DATA WRAPPER foo OPTIONS (ADD d '5');" db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case40" value="ALTER FOREIGN
DATA WRAPPER foo OPTIONS (ADD e '6');" db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case41" value="ALTER FOREIGN
DATA WRAPPER foo OPTIONS (ADD x '1', DROP x);" db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case42" value="ALTER FOREIGN
DATA WRAPPER foo OPTIONS (DROP a, SET b '3', ADD c '4');"
db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case43" value="ALTER FOREIGN
DATA WRAPPER foo OPTIONS (DROP c);" db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case44" value="ALTER FOREIGN
DATA WRAPPER foo OPTIONS (SET c '4');" db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case45" value="ALTER FOREIGN
DATA WRAPPER foo OPTIONS (a '1', b '2');"
db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case46" value="ALTER FOREIGN
DATA WRAPPER foo OPTIONS (a '2');" db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case47" value="ALTER FOREIGN
DATA WRAPPER foo OPTIONS (b '4');" db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case48" value="ALTER FOREIGN
DATA WRAPPER foo OPTIONS (gotcha 'true');" db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case49" value="ALTER FOREIGN
DATA WRAPPER foo OPTIONS (gotcha 'true');" db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case50" value="ALTER FOREIGN
DATA WRAPPER foo OPTIONS (nonexistent 'fdw');" db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case51" value="ALTER FOREIGN
DATA WRAPPER foo OWNER TO regress_test_role;" db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case52" value="ALTER FOREIGN
DATA WRAPPER foo OWNER TO regress_test_role_super;" db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case53" value="ALTER FOREIGN
DATA WRAPPER foo OWNER TO regress_unprivileged_role;" db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case54" value="ALTER FOREIGN
DATA WRAPPER foo RENAME TO foo1;" db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case55" value="ALTER FOREIGN
DATA WRAPPER foo VALIDATOR bar;" db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case56" value="ALTER FOREIGN
DATA WRAPPER foo VALIDATOR postgresql_fdw_validator;" db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case57" value="ALTER FOREIGN
DATA WRAPPER foo1 RENAME TO foo;" db-types="PostgreSQL"/>
- <sql-case id="alter_by_postgresql_source_test_case58" value="ALTER FOREIGN
DATA WRAPPER foo;" db-types="PostgreSQL"/>
<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"/>