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/08/18 01:06:51 UTC

[shardingsphere] branch master updated: Add PostgreSQL Create Operator Statement (#20249)

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 0bcf67adffa Add PostgreSQL Create Operator Statement (#20249)
0bcf67adffa is described below

commit 0bcf67adffa0c617892cab0c318e0d79992145a5
Author: Thanoshan MV <48...@users.noreply.github.com>
AuthorDate: Thu Aug 18 06:36:40 2022 +0530

    Add PostgreSQL Create Operator Statement (#20249)
---
 .../parser/autogen/PostgreSQLStatementParser.g4    |  1 +
 .../impl/PostgreSQLDDLStatementSQLVisitor.java     |  7 ++++
 .../core/database/visitor/SQLVisitorRule.java      |  4 +-
 .../statement/ddl/CreateOperatorStatement.java     | 28 +++++++++++++
 .../ddl/PostgreSQLCreateOperatorStatement.java     | 29 ++++++++++++++
 .../jaxb/cases/domain/SQLParserTestCases.java      |  4 ++
 .../ddl/CreateOperatorStatementTestCase.java       | 26 ++++++++++++
 .../main/resources/case/ddl/create-operator.xml    | 24 +++++++++++
 .../sql/supported/ddl/create-operator.xml          | 24 +++++++++++
 .../main/resources/sql/unsupported/unsupported.xml | 46 ----------------------
 10 files changed, 146 insertions(+), 47 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 9e3560f63a8..447fde1af9f 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
@@ -174,5 +174,6 @@ execute
     | createGroup
     | alterSubscription
     | createMaterializedView
+    | createOperator
     ) 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 d7c60e3f1d2..66b136f489c 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
@@ -84,6 +84,7 @@ import org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.Cr
 import org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.CreateIndexContext;
 import org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.CreateLanguageContext;
 import org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.CreateMaterializedViewContext;
+import org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.CreateOperatorContext;
 import org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.CreateProcedureContext;
 import org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.CreateRuleContext;
 import org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.CreateSchemaContext;
@@ -246,6 +247,7 @@ import org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.ddl
 import org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.ddl.PostgreSQLCreateIndexStatement;
 import org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.ddl.PostgreSQLCreateLanguageStatement;
 import org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.ddl.PostgreSQLCreateMaterializedViewStatement;
+import org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.ddl.PostgreSQLCreateOperatorStatement;
 import org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.ddl.PostgreSQLCreateProcedureStatement;
 import org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.ddl.PostgreSQLCreateRuleStatement;
 import org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.ddl.PostgreSQLCreateSchemaStatement;
@@ -1358,4 +1360,9 @@ public final class PostgreSQLDDLStatementSQLVisitor extends PostgreSQLStatementS
     public ASTNode visitCreateMaterializedView(final CreateMaterializedViewContext ctx) {
         return new PostgreSQLCreateMaterializedViewStatement();
     }
+    
+    @Override
+    public ASTNode visitCreateOperator(final CreateOperatorContext ctx) {
+        return new PostgreSQLCreateOperatorStatement();
+    }
 }
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 53f5000fd2b..f6cf9940163 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
@@ -634,7 +634,9 @@ public enum SQLVisitorRule {
     
     CREATE_GROUP("CreateGroup", SQLStatementType.DCL),
     
-    CREATE_MATERIALIZED_VIEW("CreateMaterializedView", SQLStatementType.DDL);
+    CREATE_MATERIALIZED_VIEW("CreateMaterializedView", SQLStatementType.DDL),
+    
+    CREATE_OPERATOR("CreateOperator", 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/CreateOperatorStatement.java b/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/statement/ddl/CreateOperatorStatement.java
new file mode 100644
index 00000000000..1616add0e83
--- /dev/null
+++ b/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/statement/ddl/CreateOperatorStatement.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 operator statement.
+ */
+@ToString(callSuper = true)
+public abstract class CreateOperatorStatement 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/PostgreSQLCreateOperatorStatement.java b/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/dialect/statement/postgresql/ddl/PostgreSQLCreateOperatorStatement.java
new file mode 100644
index 00000000000..51943920c5d
--- /dev/null
+++ b/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/dialect/statement/postgresql/ddl/PostgreSQLCreateOperatorStatement.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.CreateOperatorStatement;
+import org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.PostgreSQLStatement;
+
+/**
+ * PostgreSQL create operator statement.
+ */
+@ToString(callSuper = true)
+public final class PostgreSQLCreateOperatorStatement extends CreateOperatorStatement 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 bc3b62fd767..d3f8605477d 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
@@ -180,6 +180,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.CreateLanguageStatementTestCase;
 import org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl.CreateLockdownProfileStatementTestCase;
 import org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl.CreateMaterializedViewStatementTestCase;
+import org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl.CreateOperatorStatementTestCase;
 import org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl.CreatePFileStatementTestCase;
 import org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl.CreateProcedureStatementTestCase;
 import org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl.CreatePublicationStatementTestCase;
@@ -1655,6 +1656,9 @@ public final class SQLParserTestCases {
     @XmlElement(name = "create-materialized-view")
     private final List<CreateMaterializedViewStatementTestCase> createMaterializedViewStatementTestCases = new LinkedList<>();
     
+    @XmlElement(name = "create-operator")
+    private final List<CreateOperatorStatementTestCase> createOperatorStatementTestCases = 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/CreateOperatorStatementTestCase.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/ddl/CreateOperatorStatementTestCase.java
new file mode 100644
index 00000000000..019222a60d4
--- /dev/null
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/ddl/CreateOperatorStatementTestCase.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 operator statement test case.
+ */
+public final class CreateOperatorStatementTestCase extends SQLParserTestCase {
+}
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/resources/case/ddl/create-operator.xml b/shardingsphere-test/shardingsphere-parser-test/src/main/resources/case/ddl/create-operator.xml
new file mode 100644
index 00000000000..ac22ba62bdb
--- /dev/null
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/resources/case/ddl/create-operator.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-operator sql-case-id="create_operator" />
+    <create-operator sql-case-id="create_operator_with_procedure" />
+    <create-operator sql-case-id="create_operator_with_function" />
+    <create-operator sql-case-id="create_operator_with_schema_qualified_name" />
+</sql-parser-test-cases>
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/resources/sql/supported/ddl/create-operator.xml b/shardingsphere-test/shardingsphere-parser-test/src/main/resources/sql/supported/ddl/create-operator.xml
new file mode 100644
index 00000000000..c726980984c
--- /dev/null
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/resources/sql/supported/ddl/create-operator.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_operator" value="CREATE OPERATOR @-@ (LEFTARG = int4, RIGHTARG = int4, PROCEDURE = int4mi )" db-types="PostgreSQL" />
+    <sql-case id="create_operator_with_procedure" value="CREATE OPERATOR !== (PROCEDURE = int8ne, LEFTARG = bigint, RIGHTARG = bigint, NEGATOR = ===, COMMUTATOR = !== )" db-types="PostgreSQL" />
+    <sql-case id="create_operator_with_function" value="CREATE OPERATOR ## (LEFTARG = path, RIGHTARG = path, FUNCTION = path_inter, COMMUTATOR = ## )" db-types="PostgreSQL" />
+    <sql-case id="create_operator_with_schema_qualified_name" value="CREATE OPERATOR alter1.= (PROCEDURE = alter1.same, LEFTARG  = alter1.ctype, RIGHTARG = alter1.ctype)" 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 d8e18fcfb50..654ebbc7152 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
@@ -35,7 +35,6 @@
     <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_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" />
     <sql-case id="create_table_no_valid" value="create table nv_parent (d date, check (false) no inherit not valid)" db-types="PostgreSQL" />
     <sql-case id="create_as_select" value="create table attest1 as select * from atacc1" db-types="PostgreSQL" />
@@ -3472,37 +3471,6 @@
     <sql-case id="create_by_postgresql_source_test_case292" value="CREATE FUNCTION y_trigger() RETURNS trigger AS $$ begin   raise notice &apos;y_trigger: a = %&apos;, new.a;   return new; end; $$ LANGUAGE plpgsql;" db-types="PostgreSQL" />
     <sql-case id="create_by_postgresql_source_test_case297" value="CREATE INDEX IF NOT EXISTS ON onek USING btree(unique1 int4_ops);" db-types="PostgreSQL" />
     <sql-case id="create_by_postgresql_source_test_case298" value="CREATE INDEX brinidx_bloom ON brintest_bloom USING brin ( 	byteacol bytea_bloom_ops(n_distinct_per_range = -1.1) );" db-types="PostgreSQL" />
-    <sql-case id="create_by_postgresql_source_test_case338" value="CREATE OPERATOR !=- (    rightarg = int8,    procedure = factorial );" db-types="PostgreSQL" />
-    <sql-case id="create_by_postgresql_source_test_case339" value="CREATE OPERATOR !== (         PROCEDURE = int8ne,         LEFTARG = bigint,         RIGHTARG = bigint,         NEGATOR = ===,         COMMUTATOR = !== );" db-types="PostgreSQL" />
-    <sql-case id="create_by_postgresql_source_test_case340" value="CREATE OPERATOR ## (    leftarg = path,    rightarg = path,    function = path_inter,    commutator = ## );" db-types="PostgreSQL" />
-    <sql-case id="create_by_postgresql_source_test_case341" value="CREATE OPERATOR #%# (    leftarg = int8,		-- fail, postfix is no longer supported    procedure = factorial );" db-types="PostgreSQL" />
-    <sql-case id="create_by_postgresql_source_test_case342" value="CREATE OPERATOR #*# (    leftarg = SETOF int8,    procedure = factorial );" db-types="PostgreSQL" />
-    <sql-case id="create_by_postgresql_source_test_case343" value="CREATE OPERATOR #*# (    leftarg = int8,    rightarg = int8,    procedure = fn_op5 );" db-types="PostgreSQL" />
-    <sql-case id="create_by_postgresql_source_test_case344" value="CREATE OPERATOR #*# (    leftarg = int8,    rightarg = int8,    procedure = fn_op6 );" db-types="PostgreSQL" />
-    <sql-case id="create_by_postgresql_source_test_case345" value="CREATE OPERATOR #*# (    leftarg = int8,    rightarg = type_op4,    procedure = fn_op4 );" db-types="PostgreSQL" />
-    <sql-case id="create_by_postgresql_source_test_case346" value="CREATE OPERATOR #*# (    leftarg = type_op3,    rightarg = int8,    procedure = fn_op3 );" db-types="PostgreSQL" />
-    <sql-case id="create_by_postgresql_source_test_case347" value="CREATE OPERATOR #*# (    rightarg = SETOF int8,    procedure = factorial );" db-types="PostgreSQL" />
-    <sql-case id="create_by_postgresql_source_test_case348" value="CREATE OPERATOR #@%# (    procedure = factorial );" db-types="PostgreSQL" />
-    <sql-case id="create_by_postgresql_source_test_case349" value="CREATE OPERATOR #@%# (    rightarg = int8 );" db-types="PostgreSQL" />
-    <sql-case id="create_by_postgresql_source_test_case350" value="CREATE OPERATOR #@%# (    rightarg = int8,    procedure = factorial,    invalid_att = int8 );" db-types="PostgreSQL" />
-    <sql-case id="create_by_postgresql_source_test_case351" value="CREATE OPERATOR &lt;% (    leftarg = point,    rightarg = widget,    procedure = pt_in_widget,    commutator = &gt;% ,    negator = &gt;=% );" db-types="PostgreSQL" />
-    <sql-case id="create_by_postgresql_source_test_case352" value="CREATE OPERATOR &lt;&lt;&lt; (procedure = leak, leftarg = integer, rightarg = integer,                      restrict = scalarltsel);" db-types="PostgreSQL" />
-    <sql-case id="create_by_postgresql_source_test_case353" value="CREATE OPERATOR &lt;&lt;&lt; (procedure = op_leak, leftarg = int, rightarg = int,                      restrict = scalarltsel);" db-types="PostgreSQL" />
-    <sql-case id="create_by_postgresql_source_test_case354" value="CREATE OPERATOR &lt;&lt;&lt; (procedure = op_leak, leftarg = int, rightarg = int,                      restrict = scalarltsel);" db-types="PostgreSQL" />
-    <sql-case id="create_by_postgresql_source_test_case355" value="CREATE OPERATOR &lt;| (         PROCEDURE = int8lt,         LEFTARG = bigint,         RIGHTARG = bigint );" db-types="PostgreSQL" />
-    <sql-case id="create_by_postgresql_source_test_case356" value="CREATE OPERATOR = (procedure = ad_eq,                    leftarg = arrdomain, rightarg = arrdomain);" db-types="PostgreSQL" />
-    <sql-case id="create_by_postgresql_source_test_case357" value="CREATE OPERATOR = (procedure = inline_eq,                    leftarg = foodomain, rightarg = foodomain);" db-types="PostgreSQL" />
-    <sql-case id="create_by_postgresql_source_test_case358" value="CREATE OPERATOR === ( 	&quot;Leftarg&quot; = box, 	&quot;Rightarg&quot; = box, 	&quot;Procedure&quot; = area_equal_function, 	&quot;Commutator&quot; = ===, 	&quot;Negator&quot; = !==, 	&quot;Restrict&quot; = area_restriction_function, 	&quot;Join&quot; = area_join_function, 	&quot;Hashes&quot;, 	&quot;Merges&quot; );" db-types="PostgreSQL" />
-    <sql-case id="create_by_postgresql_source_test_case359" value="CREATE OPERATOR === (         PROCEDURE = int8eq,         LEFTARG = bigint,         RIGHTARG = bigint,         COMMUTATOR = === );" db-types="PostgreSQL" />
-    <sql-case id="create_by_postgresql_source_test_case360" value="CREATE OPERATOR === (     LEFTARG = boolean,     RIGHTARG = boolean,     PROCEDURE = alter_op_test_fn,     COMMUTATOR = ===,     NEGATOR = !==,     RESTRICT = customcontsel,     JOIN = contjoinsel,     HASHES, MERGES );" db-types="PostgreSQL" />
-    <sql-case id="create_by_postgresql_source_test_case361" value="CREATE OPERATOR === (     LEFTARG = boolean,     RIGHTARG = boolean,     PROCEDURE = fn_op2,     COMMUTATOR = ===,     NEGATOR = !==,     RESTRICT = contsel,     JOIN = contjoinsel,     SORT1, SORT2, LTCMP, GTCMP, HASHES, MERGES );" db-types="PostgreSQL" />
-    <sql-case id="create_by_postgresql_source_test_case362" value="CREATE OPERATOR =&gt; (    rightarg = int8,    procedure = factorial );" db-types="PostgreSQL" />
-    <sql-case id="create_by_postgresql_source_test_case363" value="CREATE OPERATOR &gt;&gt;&gt; (procedure = leak2, leftarg = integer, rightarg = integer,                      restrict = scalargtsel);" db-types="PostgreSQL" />
-    <sql-case id="create_by_postgresql_source_test_case364" value="CREATE OPERATOR @#@         (leftarg = int8, rightarg = int8, procedure = int8xor);" db-types="PostgreSQL" />
-    <sql-case id="create_by_postgresql_source_test_case365" value="CREATE OPERATOR @#@ (    rightarg = int8,		-- prefix    procedure = factorial );" db-types="PostgreSQL" />
-    <sql-case id="create_by_postgresql_source_test_case366" value="CREATE OPERATOR @+@ ( leftarg = int4, rightarg = int4, procedure = int4pl );" db-types="PostgreSQL" />
-    <sql-case id="create_by_postgresql_source_test_case367" value="CREATE OPERATOR @-@ ( leftarg = int4, rightarg = int4, procedure = int4mi );" db-types="PostgreSQL" />
-    <sql-case id="create_by_postgresql_source_test_case368" value="CREATE OPERATOR @-@ ( leftarg = int4, rightarg = int4, procedure = int4mi );" db-types="PostgreSQL" />
     <sql-case id="create_by_postgresql_source_test_case369" value="CREATE OPERATOR CLASS alt_opc1 FOR TYPE macaddr USING hash AS STORAGE macaddr;" db-types="PostgreSQL" />
     <sql-case id="create_by_postgresql_source_test_case370" value="CREATE OPERATOR CLASS alt_opc1 FOR TYPE uuid USING hash AS STORAGE uuid;" db-types="PostgreSQL" />
     <sql-case id="create_by_postgresql_source_test_case371" value="CREATE OPERATOR CLASS alt_opc2 FOR TYPE macaddr USING hash AS STORAGE macaddr;" db-types="PostgreSQL" />
@@ -3530,9 +3498,6 @@
     <sql-case id="create_by_postgresql_source_test_case393" value="CREATE OPERATOR FAMILY alt_opf7 USING btree;" db-types="PostgreSQL" />
     <sql-case id="create_by_postgresql_source_test_case394" value="CREATE OPERATOR FAMILY alt_opf8 USING btree;" db-types="PostgreSQL" />
     <sql-case id="create_by_postgresql_source_test_case395" value="CREATE OPERATOR FAMILY alt_opf9 USING gist;" db-types="PostgreSQL" />
-    <sql-case id="create_by_postgresql_source_test_case396" value="CREATE OPERATOR schema_op1.#*# (    rightarg = int8,    procedure = factorial );" db-types="PostgreSQL" />
-    <sql-case id="create_by_postgresql_source_test_case397" value="CREATE OPERATOR |&gt; (         PROCEDURE = int8gt,         LEFTARG = bigint,         RIGHTARG = bigint,         NEGATOR = &lt;|,         COMMUTATOR = &lt;| );" db-types="PostgreSQL" />
-    <sql-case id="create_by_postgresql_source_test_case398" value="CREATE OPERATOR |@| (PROCEDURE = unnest, RIGHTARG = ANYARRAY);" db-types="PostgreSQL" />
     <sql-case id="create_by_postgresql_source_test_case404" value="CREATE OR REPLACE FUNCTION   mylt2 (x text, y text) RETURNS boolean LANGUAGE plpgsql AS $$ declare   xx text COLLATE &quot;POSIX&quot; := x;   yy text := y; begin   return xx &lt; yy; end $$;" db-types="PostgreSQL" />
     <sql-case id="create_by_postgresql_source_test_case405" value="CREATE OR REPLACE FUNCTION compare_relfilenode_part(tabname text)   RETURNS TABLE (relname name, relkind &quot;char&quot;, state text) AS   $func$   BEGIN     RETURN QUERY EXECUTE       format(         &apos;SELECT  b.relname,                  b.relkind,                  CASE WHEN a.relfilenode = b.relfilenode THEN &apos;&apos;relfilenode is unchanged&apos;&apos;                  ELSE &apos;&apos;relfilenode has changed&a [...]
     <sql-case id="create_by_postgresql_source_test_case406" value="CREATE OR REPLACE FUNCTION create_relfilenode_part(relname text, indname text)   RETURNS VOID AS   $func$   BEGIN   EXECUTE format(&apos;     CREATE TABLE %I AS       SELECT oid, relname, relfilenode, relkind, reltoastrelid       FROM pg_class       WHERE oid IN          (SELECT relid FROM pg_partition_tree(&apos;&apos;%I&apos;&apos;));&apos;, 	 relname, indname);   END   $func$ LANGUAGE plpgsql;" db-types="PostgreSQL" />
@@ -5953,23 +5918,12 @@
     <sql-case id="low_create_by_postgresql_source_test_case301" value="create function wait_for_stats() returns void as $$ declare   start_time timestamptz := clock_timestamp();   updated1 bool;   updated2 bool;   updated3 bool;   updated4 bool; begin   for i in 1 .. 300 loop     SELECT (st.seq_scan &gt;= pr.seq_scan + 1) INTO updated1       FROM pg_stat_user_tables AS st, pg_class AS cl, prevstats AS pr      WHERE st.relname=&apos;tenk2&apos; AND cl.relname=&apos;tenk2&apos;;     SELECT [...]
     <sql-case id="low_create_by_postgresql_source_test_case302" value="create function zero_divide() returns int as $$ declare v int := 0; begin   return 10 / v; end; $$ language plpgsql;" db-types="PostgreSQL" />
     <sql-case id="low_create_by_postgresql_source_test_case303" value="create index on test_range_elem using spgist(int4range(i,i+10));" db-types="PostgreSQL" />
-    <sql-case id="low_create_by_postgresql_source_test_case307" value="create operator &lt; (     procedure = int8alias1lt,     leftarg = int8alias1, rightarg = int8alias1 );" db-types="PostgreSQL" />
-    <sql-case id="low_create_by_postgresql_source_test_case308" value="create operator &lt;&gt; (   leftarg    = myint,   rightarg   = myint,   commutator = &lt;&gt;,   negator    = =,   procedure  = myintne,   restrict   = eqsel,   join       = eqjoinsel,   merges );" db-types="PostgreSQL" />
-    <sql-case id="low_create_by_postgresql_source_test_case309" value="create operator = (     procedure = int8alias1eq,     leftarg = int8, rightarg = int8alias1,     restrict = eqsel, join = eqjoinsel,     merges );" db-types="PostgreSQL" />
-    <sql-case id="low_create_by_postgresql_source_test_case310" value="create operator = (     procedure = int8alias1eq,     leftarg = int8alias1, rightarg = int8alias1,     commutator = =,     restrict = eqsel, join = eqjoinsel,     merges );" db-types="PostgreSQL" />
-    <sql-case id="low_create_by_postgresql_source_test_case311" value="create operator = (     procedure = int8alias1eq,     leftarg = int8alias1, rightarg = int8alias2,     restrict = eqsel, join = eqjoinsel,     merges );" db-types="PostgreSQL" />
-    <sql-case id="low_create_by_postgresql_source_test_case312" value="create operator = (     procedure = int8alias2eq,     leftarg = int8alias2, rightarg = int8alias2,     commutator = =,     restrict = eqsel, join = eqjoinsel,     merges );" db-types="PostgreSQL" />
-    <sql-case id="low_create_by_postgresql_source_test_case313" value="create operator = (   leftarg    = myint,   rightarg   = myint,   commutator = =,   negator    = &lt;&gt;,   procedure  = myinteq,   restrict   = eqsel,   join       = eqjoinsel,   merges );" db-types="PostgreSQL" />
-    <sql-case id="low_create_by_postgresql_source_test_case314" value="create operator = (procedure=bogus_int8_text_eq, leftarg=int8, rightarg=text);" db-types="PostgreSQL" />
-    <sql-case id="low_create_by_postgresql_source_test_case315" value="create operator === (    leftarg = int4,    rightarg = int4,    procedure = int4eq,    commutator = ===,    hashes );" db-types="PostgreSQL" />
-    <sql-case id="low_create_by_postgresql_source_test_case316" value="create operator alter1.=(procedure = alter1.same, leftarg  = alter1.ctype, rightarg = alter1.ctype);" db-types="PostgreSQL" />
     <sql-case id="low_create_by_postgresql_source_test_case317" value="create operator class alter1.ctype_hash_ops default for type alter1.ctype using hash as   operator 1 alter1.=(alter1.ctype, alter1.ctype);" db-types="PostgreSQL" />
     <sql-case id="low_create_by_postgresql_source_test_case318" value="create operator class custom_opclass for type int4 using hash as operator 1 = , function 2 dummy_hashint4(int4, int8);" db-types="PostgreSQL" />
     <sql-case id="low_create_by_postgresql_source_test_case319" value="create operator class myint_ops default for type myint using hash as   operator    1   =  (myint, myint),   function    1   myinthash(myint);" db-types="PostgreSQL" />
     <sql-case id="low_create_by_postgresql_source_test_case320" value="create operator class part_test_int4_ops for type int4 using hash as operator 1 =, function 2 part_hashint4_noop(int4, int8);" db-types="PostgreSQL" />
     <sql-case id="low_create_by_postgresql_source_test_case321" value="create operator class part_test_int4_ops2 for type int4 using hash as operator 1 ===, function 2 part_hashint4_noop(int4, int8);" db-types="PostgreSQL" />
     <sql-case id="low_create_by_postgresql_source_test_case322" value="create operator class part_test_text_ops for type text using hash as operator 1 =, function 2 part_hashtext_length(text, int8);" db-types="PostgreSQL" />
-    <sql-case id="low_create_by_postgresql_source_test_case323" value="create operator pg_temp.@@ (leftarg = int4, rightarg = int4, procedure = int4mi);" db-types="PostgreSQL" />
     <sql-case id="low_create_by_postgresql_source_test_case324" value="create or replace function array_elem_check(int) returns int as $$ declare   x orderedpair := &apos;{1,2}&apos;; begin   x[2] := $1;   return x[2]; end$$ language plpgsql;" db-types="PostgreSQL" />
     <sql-case id="low_create_by_postgresql_source_test_case325" value="create or replace function array_elem_check(numeric) returns numeric as $$ declare   x mynums2; begin   x[1] := $1;   return x[1]; end$$ language plpgsql;" db-types="PostgreSQL" />
     <sql-case id="low_create_by_postgresql_source_test_case326" value="create or replace function array_elem_check(numeric) returns numeric as $$ declare   x mynums; begin   x[1] := $1;   return x[1]; end$$ language plpgsql;" db-types="PostgreSQL" />