You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by du...@apache.org on 2022/07/16 07:08:51 UTC

[shardingsphere] branch master updated: Add PostgreSQL Create Foreign Data Wrapper Statement (#19249)

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 c5472a0be09 Add PostgreSQL Create Foreign Data Wrapper Statement (#19249)
c5472a0be09 is described below

commit c5472a0be0989e0ff7fb57347aae594ccf24a1a8
Author: Thanoshan MV <48...@users.noreply.github.com>
AuthorDate: Sat Jul 16 12:38:39 2022 +0530

    Add PostgreSQL Create Foreign Data Wrapper Statement (#19249)
    
    * Add PostgreSQL Create Foreign Data Wrapper Statement
    
    * Remove unnecessary change
    
    * Revert "Remove unnecessary change"
    
    This reverts commit 70071115c3c57c47dcd03184dfdc9a0983644988.
---
 .../parser/autogen/PostgreSQLStatementParser.g4    |  1 +
 .../impl/PostgreSQLDDLStatementSQLVisitor.java     |  7 ++++++
 .../core/database/visitor/SQLVisitorRule.java      |  4 ++-
 .../ddl/CreateForeignDataWrapperStatement.java     | 28 +++++++++++++++++++++
 ...ostgreSQLCreateForeignDataWrapperStatement.java | 29 ++++++++++++++++++++++
 .../jaxb/cases/domain/SQLParserTestCases.java      |  4 +++
 .../CreateForeignDataWrapperStatementTestCase.java | 26 +++++++++++++++++++
 .../case/ddl/create-foreign-data-wrapper.xml       | 24 ++++++++++++++++++
 .../supported/ddl/create-foreign-data-wrapper.xml  | 24 ++++++++++++++++++
 .../main/resources/sql/unsupported/unsupported.xml | 25 -------------------
 10 files changed, 146 insertions(+), 26 deletions(-)

diff --git a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/antlr4/org/apache/shardingsphere/sql/parser/autogen/PostgreSQLStatementParser.g4 b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/antlr4/org/apache/shardingsphere/sql/parser/autogen/PostgreSQLStatementParser.g4
index 8127f9f6a34..daa5558eed4 100644
--- a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/antlr4/org/apache/shardingsphere/sql/parser/autogen/PostgreSQLStatementParser.g4
+++ b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/antlr4/org/apache/shardingsphere/sql/parser/autogen/PostgreSQLStatementParser.g4
@@ -168,5 +168,6 @@ execute
     | reindex
     | securityLabelStmt
     | createEventTrigger
+    | createForeignDataWrapper
     ) SEMI_? EOF
     ;
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 8c433545813..b9478c7e3db 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
@@ -75,6 +75,7 @@ import org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.Cr
 import org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.CreateDomainContext;
 import org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.CreateEventTriggerContext;
 import org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.CreateExtensionContext;
+import org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.CreateForeignDataWrapperContext;
 import org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.CreateFunctionContext;
 import org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.CreateIndexContext;
 import org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.CreateLanguageContext;
@@ -231,6 +232,7 @@ import org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.ddl
 import org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.ddl.PostgreSQLCreateDomainStatement;
 import org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.ddl.PostgreSQLCreateEventTriggerStatement;
 import org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.ddl.PostgreSQLCreateExtensionStatement;
+import org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.ddl.PostgreSQLCreateForeignDataWrapperStatement;
 import org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.ddl.PostgreSQLCreateFunctionStatement;
 import org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.ddl.PostgreSQLCreateIndexStatement;
 import org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.ddl.PostgreSQLCreateLanguageStatement;
@@ -1316,4 +1318,9 @@ public final class PostgreSQLDDLStatementSQLVisitor extends PostgreSQLStatementS
     public ASTNode visitCreateEventTrigger(final CreateEventTriggerContext ctx) {
         return new PostgreSQLCreateEventTriggerStatement();
     }
+    
+    @Override
+    public ASTNode visitCreateForeignDataWrapper(final CreateForeignDataWrapperContext ctx) {
+        return new PostgreSQLCreateForeignDataWrapperStatement();
+    }
 }
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 a9a90c03cd0..adc8697b29f 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
@@ -614,7 +614,9 @@ public enum SQLVisitorRule {
     
     CREATE_COLLATION("CreateCollation", SQLStatementType.DDL),
     
-    CREATE_EVENT_TRIGGER("CreateEventTrigger", SQLStatementType.DDL);
+    CREATE_EVENT_TRIGGER("CreateEventTrigger", SQLStatementType.DDL),
+    
+    CREATE_FOREIGN_DATA_WRAPPER("CreateForeignDataWrapper", SQLStatementType.DDL);
     
     private final String name;
     
diff --git a/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/statement/ddl/CreateForeignDataWrapperStatement.java b/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/statement/ddl/CreateForeignDataWrapperStatement.java
new file mode 100644
index 00000000000..8ae95435934
--- /dev/null
+++ b/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/statement/ddl/CreateForeignDataWrapperStatement.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;
+
+/**
+ * Create foreign data wrapper statement.
+ */
+@ToString(callSuper = true)
+public abstract class CreateForeignDataWrapperStatement 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/postgresql/ddl/PostgreSQLCreateForeignDataWrapperStatement.java b/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/dialect/statement/postgresql/ddl/PostgreSQLCreateForeignDataWrapperStatement.java
new file mode 100644
index 00000000000..ec8f75e7541
--- /dev/null
+++ b/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/dialect/statement/postgresql/ddl/PostgreSQLCreateForeignDataWrapperStatement.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.CreateForeignDataWrapperStatement;
+import org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.PostgreSQLStatement;
+
+/**
+ * PostgreSQL create foreign data wrapper statement.
+ */
+@ToString(callSuper = true)
+public final class PostgreSQLCreateForeignDataWrapperStatement extends CreateForeignDataWrapperStatement 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 c2ea18eb754..fbf4b497c21 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
@@ -164,6 +164,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.CreateEventTriggerStatementTestCase;
 import org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl.CreateExtensionStatementTestCase;
 import org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl.CreateFlashbackArchiveStatementTestCase;
+import org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl.CreateForeignDataWrapperStatementTestCase;
 import org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl.CreateFunctionStatementTestCase;
 import org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl.CreateIndexStatementTestCase;
 import org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl.CreateInmemoryJoinGroupStatementTestCase;
@@ -1595,6 +1596,9 @@ public final class SQLParserTestCases {
     @XmlElement(name = "create-event-trigger")
     private final List<CreateEventTriggerStatementTestCase> createEventTriggerStatementTestCases = new LinkedList<>();
     
+    @XmlElement(name = "create-foreign-data-wrapper")
+    private final List<CreateForeignDataWrapperStatementTestCase> createForeignDataWrapperStatementTestCases = new LinkedList<>();
+    
     /**
      * Get all SQL parser test cases.
      *
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/ddl/CreateForeignDataWrapperStatementTestCase.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/ddl/CreateForeignDataWrapperStatementTestCase.java
new file mode 100644
index 00000000000..55bfee86548
--- /dev/null
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/ddl/CreateForeignDataWrapperStatementTestCase.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;
+
+/**
+ * Create foreign data wrapper statement test case.
+ */
+public final class CreateForeignDataWrapperStatementTestCase extends SQLParserTestCase {
+}
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/resources/case/ddl/create-foreign-data-wrapper.xml b/shardingsphere-test/shardingsphere-parser-test/src/main/resources/case/ddl/create-foreign-data-wrapper.xml
new file mode 100644
index 00000000000..8145f28fcc5
--- /dev/null
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/resources/case/ddl/create-foreign-data-wrapper.xml
@@ -0,0 +1,24 @@
+<?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>
+    <create-foreign-data-wrapper sql-case-id="create_foreign_data_wrapper" />
+    <create-foreign-data-wrapper sql-case-id="create_foreign_data_wrapper_with_validator" />
+    <create-foreign-data-wrapper sql-case-id="create_foreign_data_wrapper_with_options" />
+    <create-foreign-data-wrapper sql-case-id="create_foreign_data_wrapper_with_handler" />
+</sql-parser-test-cases>
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/resources/sql/supported/ddl/create-foreign-data-wrapper.xml b/shardingsphere-test/shardingsphere-parser-test/src/main/resources/sql/supported/ddl/create-foreign-data-wrapper.xml
new file mode 100644
index 00000000000..7330566a873
--- /dev/null
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/resources/sql/supported/ddl/create-foreign-data-wrapper.xml
@@ -0,0 +1,24 @@
+<?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="create_foreign_data_wrapper" value="CREATE FOREIGN DATA WRAPPER addr_fdw;" db-types="PostgreSQL" />
+    <sql-case id="create_foreign_data_wrapper_with_validator" value="CREATE FOREIGN DATA WRAPPER fdw_heap2 VALIDATOR postgresql_fdw_validator;" db-types="PostgreSQL" />
+    <sql-case id="create_foreign_data_wrapper_with_options" value="CREATE FOREIGN DATA WRAPPER foo OPTIONS (&quot;test wrapper&quot; &apos;true&apos;);" db-types="PostgreSQL" />
+    <sql-case id="create_foreign_data_wrapper_with_handler" value="CREATE FOREIGN DATA WRAPPER test_fdw HANDLER invalid_fdw_handler;" 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 6354e65bcc5..179ba2bd232 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
@@ -34,7 +34,6 @@
     <sql-case id="with_select_comment" value="WITH cte AS /*! ( */ SELECT 0) SELECT * FROM cte a, cte b;" db-types="MySQL" />
     <sql-case id="select_cast" value="SELECT cast( NULL AT TIME ZONE 'UTC' AS DATETIME );" db-types="MySQL" />
     <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="create_operator" value="CREATE OPERATOR @-@ ( leftarg = int4, rightarg = int4, procedure = int4mi )" db-types="PostgreSQL" />
     <sql-case id="create_statistics" value="CREATE STATISTICS alt_stat1 ON a, b FROM alt_regress_1" db-types="PostgreSQL" />
@@ -3487,29 +3486,6 @@
     <sql-case id="alter_by_postgresql_source_test_case460" value="ALTER TYPE tt_t0 DROP ATTRIBUTE z;" db-types="PostgreSQL" />
     <sql-case id="analyze_by_postgresql_source_test_case1" value="ANALYZE (nonexistent-arg) does_not_exist;" db-types="PostgreSQL" />
     <sql-case id="create_by_postgresql_source_test_case124" value="CREATE CONSTRAINT TRIGGER trigtest_constraint AFTER INSERT OR UPDATE OR DELETE ON foreign_schema.foreign_table_1 FOR EACH ROW EXECUTE PROCEDURE dummy_trigger();" db-types="PostgreSQL" />
-    <sql-case id="create_by_postgresql_source_test_case133" value="CREATE FOREIGN DATA WRAPPER addr_fdw;" db-types="PostgreSQL" />
-    <sql-case id="create_by_postgresql_source_test_case134" value="CREATE FOREIGN DATA WRAPPER alt_fdw1;" db-types="PostgreSQL" />
-    <sql-case id="create_by_postgresql_source_test_case135" value="CREATE FOREIGN DATA WRAPPER alt_fdw2;" db-types="PostgreSQL" />
-    <sql-case id="create_by_postgresql_source_test_case136" value="CREATE FOREIGN DATA WRAPPER dummy;" db-types="PostgreSQL" />
-    <sql-case id="create_by_postgresql_source_test_case137" value="CREATE FOREIGN DATA WRAPPER dummy;" db-types="PostgreSQL" />
-    <sql-case id="create_by_postgresql_source_test_case138" value="CREATE FOREIGN DATA WRAPPER extstats_dummy_fdw;" db-types="PostgreSQL" />
-    <sql-case id="create_by_postgresql_source_test_case139" value="CREATE FOREIGN DATA WRAPPER fdw_heap2 VALIDATOR postgresql_fdw_validator;" db-types="PostgreSQL" />
-    <sql-case id="create_by_postgresql_source_test_case140" value="CREATE FOREIGN DATA WRAPPER foo OPTIONS (&quot;test wrapper&quot; &apos;true&apos;);" db-types="PostgreSQL" />
-    <sql-case id="create_by_postgresql_source_test_case141" value="CREATE FOREIGN DATA WRAPPER foo OPTIONS (testing &apos;1&apos;);" db-types="PostgreSQL" />
-    <sql-case id="create_by_postgresql_source_test_case142" value="CREATE FOREIGN DATA WRAPPER foo OPTIONS (testing &apos;1&apos;, another &apos;2&apos;);" db-types="PostgreSQL" />
-    <sql-case id="create_by_postgresql_source_test_case143" value="CREATE FOREIGN DATA WRAPPER foo OPTIONS (testing &apos;1&apos;, testing &apos;2&apos;);" db-types="PostgreSQL" />
-    <sql-case id="create_by_postgresql_source_test_case144" value="CREATE FOREIGN DATA WRAPPER foo VALIDATOR bar;" db-types="PostgreSQL" />
-    <sql-case id="create_by_postgresql_source_test_case145" value="CREATE FOREIGN DATA WRAPPER foo VALIDATOR postgresql_fdw_validator;" db-types="PostgreSQL" />
-    <sql-case id="create_by_postgresql_source_test_case146" value="CREATE FOREIGN DATA WRAPPER foo;" db-types="PostgreSQL" />
-    <sql-case id="create_by_postgresql_source_test_case147" value="CREATE FOREIGN DATA WRAPPER foo;" db-types="PostgreSQL" />
-    <sql-case id="create_by_postgresql_source_test_case148" value="CREATE FOREIGN DATA WRAPPER foo;" db-types="PostgreSQL" />
-    <sql-case id="create_by_postgresql_source_test_case149" value="CREATE FOREIGN DATA WRAPPER foo;" db-types="PostgreSQL" />
-    <sql-case id="create_by_postgresql_source_test_case150" value="CREATE FOREIGN DATA WRAPPER foobar;" db-types="PostgreSQL" />
-    <sql-case id="create_by_postgresql_source_test_case151" value="CREATE FOREIGN DATA WRAPPER foobar;" db-types="PostgreSQL" />
-    <sql-case id="create_by_postgresql_source_test_case152" value="CREATE FOREIGN DATA WRAPPER postgresql VALIDATOR postgresql_fdw_validator;" db-types="PostgreSQL" />
-    <sql-case id="create_by_postgresql_source_test_case153" value="CREATE FOREIGN DATA WRAPPER test_fdw HANDLER invalid_fdw_handler;" db-types="PostgreSQL" />
-    <sql-case id="create_by_postgresql_source_test_case154" value="CREATE FOREIGN DATA WRAPPER test_fdw HANDLER test_fdw_handler HANDLER invalid_fdw_handler;" db-types="PostgreSQL" />
-    <sql-case id="create_by_postgresql_source_test_case155" value="CREATE FOREIGN DATA WRAPPER test_fdw HANDLER test_fdw_handler;" db-types="PostgreSQL" />
     <sql-case id="create_by_postgresql_source_test_case156" value="CREATE FOREIGN TABLE addr_nsp.genftable (a int) SERVER addr_fserv;" db-types="PostgreSQL" />
     <sql-case id="create_by_postgresql_source_test_case157" value="CREATE FOREIGN TABLE fd_pt2_1 ( 	c1 integer NOT NULL, 	c2 text, 	c3 date ) SERVER s0 OPTIONS (delimiter &apos;,&apos;, quote &apos;&quot;&apos;, &quot;be quoted&quot; &apos;value&apos;);" db-types="PostgreSQL" />
     <sql-case id="create_by_postgresql_source_test_case158" value="CREATE FOREIGN TABLE fd_pt2_1 ( 	c1 integer NOT NULL, 	c2 text, 	c3 date, 	c4 char ) SERVER s0 OPTIONS (delimiter &apos;,&apos;, quote &apos;&quot;&apos;, &quot;be quoted&quot; &apos;value&apos;);" db-types="PostgreSQL" />
@@ -5936,7 +5912,6 @@
     <sql-case id="low_create_by_postgresql_source_test_case42" value="create constraint trigger parted_trigger after update on parted_trigger   from parted_referenced   for each row execute procedure trigger_notice_ab();" db-types="PostgreSQL" />
     <sql-case id="low_create_by_postgresql_source_test_case43" value="create constraint trigger parted_trigger after update on unparted_trigger   from parted_referenced   for each row execute procedure trigger_notice_ab();" db-types="PostgreSQL" />
     <sql-case id="low_create_by_postgresql_source_test_case44" value="create domain restrictedrange as int4range check (upper(value) &lt; 10);" db-types="PostgreSQL" />
-    <sql-case id="low_create_by_postgresql_source_test_case61" value="create foreign data wrapper useless;" db-types="PostgreSQL" />
     <sql-case id="low_create_by_postgresql_source_test_case62" value="create function add_group(grp anyarray, ad anyelement, size integer)   returns anyarray   as $$ begin   if grp is null then     return array[ad];   end if;   if array_upper(grp, 1) &lt; size then     return grp || ad;   end if;   return grp; end; $$   language plpgsql immutable;" db-types="PostgreSQL" />
     <sql-case id="low_create_by_postgresql_source_test_case63" value="create function anyctest(a anyelement, b anyarray,                          c anycompatible, d anycompatible) returns anycompatiblearray as $$   select array[c, d] $$ language sql;" db-types="PostgreSQL" />
     <sql-case id="low_create_by_postgresql_source_test_case64" value="create function anyctest(anycompatible) returns anycompatiblemultirange as $$   select $1 $$ language sql;" db-types="PostgreSQL" />