This is an automated email from the ASF dual-hosted git repository.

strongduanmu 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 8a10a2f4822 Complete PostgreSQL DDL parsing and dispatch (#40203)
8a10a2f4822 is described below

commit 8a10a2f4822841b45561796ad02c4709ae69e2e2
Author: ZhangCheng <[email protected]>
AuthorDate: Mon Oct 19 16:07:02 2026 +0800

    Complete PostgreSQL DDL parsing and dispatch (#40203)
    
    * Complete PostgreSQL DDL parsing and dispatch
    
    * Normalize PostgreSQL DDL parser formatting
    
    * Normalize PostgreSQL expected parser case XML
    
    * Fix PostgreSQL index expression column extraction
---
 .../src/main/antlr4/imports/postgresql/BaseRule.g4 |  3 +
 .../main/antlr4/imports/postgresql/DDLStatement.g4 | 23 ++++++--
 .../antlr4/imports/postgresql/PostgreSQLKeyword.g4 |  8 +++
 .../parser/autogen/PostgreSQLStatementParser.g4    | 10 ++++
 .../type/PostgreSQLDDLStatementVisitor.java        | 34 ++++++-----
 .../ddl/PostgreSQLAlterSystemStatement.java        | 31 ++++++++++
 .../postgresql/PostgreSQLDDLStatementAssert.java   |  4 ++
 .../ddl/standard/StandardDDLStatementAssert.java   |  9 ++-
 .../cases/parser/jaxb/RootSQLParserTestCases.java  |  4 ++
 .../PostgreSQLAlterSystemStatementTestCase.java    | 26 +++++++++
 .../parser/src/main/resources/case/dal/reset.xml   | 12 ++++
 .../parser/src/main/resources/case/dcl/grant.xml   | 28 +++++++++
 .../parser/src/main/resources/case/dcl/revoke.xml  | 15 +++++
 .../case/ddl/alter-default-privileges.xml          |  2 +
 .../{create-server.xml => alter-event-trigger.xml} |  5 +-
 .../{create-server.xml => alter-large-object.xml}  |  3 +-
 .../src/main/resources/case/ddl/alter-operator.xml |  8 +++
 .../main/resources/case/ddl/alter-publication.xml  |  5 ++
 .../src/main/resources/case/ddl/alter-system.xml   |  2 +
 .../src/main/resources/case/ddl/alter-table.xml    | 43 ++++++++++++++
 .../{create-server.xml => alter-user-mapping.xml}  |  4 +-
 .../main/resources/case/ddl/create-function.xml    |  9 +++
 .../src/main/resources/case/ddl/create-index.xml   | 67 ++++++++++++++++++++++
 .../main/resources/case/ddl/create-operator.xml    |  4 ++
 .../main/resources/case/ddl/create-procedure.xml   |  3 +
 .../main/resources/case/ddl/create-publication.xml |  3 +
 .../src/main/resources/case/ddl/create-server.xml  |  3 +
 .../{create-server.xml => create-statistics.xml}   |  6 +-
 ...ate-publication.xml => create-subscription.xml} |  8 ++-
 .../{create-server.xml => create-transform.xml}    |  4 +-
 .../{create-server.xml => create-user-mapping.xml} |  5 +-
 .../src/main/resources/case/ddl/drop-database.xml  |  5 ++
 .../{create-server.xml => drop-user-mapping.xml}   |  4 +-
 .../parser/src/main/resources/case/dml/select.xml  | 10 ++++
 .../src/main/resources/sql/supported/dal/reset.xml |  8 +++
 .../resources/sql/supported/dcl/grant-user.xml     | 12 ++++
 .../resources/sql/supported/dcl/revoke-user.xml    |  6 ++
 .../sql/supported/ddl/alter-default-privileges.xml |  2 +
 .../{create-server.xml => alter-event-trigger.xml} |  4 +-
 .../{create-server.xml => alter-large-object.xml}  |  2 +-
 .../resources/sql/supported/ddl/alter-operator.xml |  8 +++
 .../sql/supported/ddl/alter-publication.xml        |  5 ++
 .../resources/sql/supported/ddl/alter-system.xml   |  2 +
 .../resources/sql/supported/ddl/alter-table.xml    |  7 +++
 .../{create-server.xml => alter-user-mapping.xml}  |  3 +-
 .../sql/supported/ddl/create-function.xml          |  9 +++
 .../resources/sql/supported/ddl/create-index.xml   |  8 +++
 .../sql/supported/ddl/create-operator.xml          |  4 ++
 .../sql/supported/ddl/create-procedure.xml         |  3 +
 .../sql/supported/ddl/create-publication.xml       |  3 +
 .../resources/sql/supported/ddl/create-server.xml  |  3 +
 ...reate-publication.xml => create-statistics.xml} |  7 ++-
 .../sql/supported/ddl/create-subscription.xml      | 25 ++++++++
 .../{create-server.xml => create-transform.xml}    |  3 +-
 .../{create-server.xml => create-user-mapping.xml} |  4 +-
 .../resources/sql/supported/ddl/drop-database.xml  |  5 ++
 .../{create-server.xml => drop-user-mapping.xml}   |  3 +-
 .../main/resources/sql/supported/dml/select.xml    |  1 +
 58 files changed, 501 insertions(+), 46 deletions(-)

diff --git 
a/parser/sql/engine/dialect/postgresql/src/main/antlr4/imports/postgresql/BaseRule.g4
 
b/parser/sql/engine/dialect/postgresql/src/main/antlr4/imports/postgresql/BaseRule.g4
index e62df404188..cb2dcbccd6a 100644
--- 
a/parser/sql/engine/dialect/postgresql/src/main/antlr4/imports/postgresql/BaseRule.g4
+++ 
b/parser/sql/engine/dialect/postgresql/src/main/antlr4/imports/postgresql/BaseRule.g4
@@ -138,6 +138,7 @@ unreservedWord
     | ASSIGNMENT
     | AT
     | ATTACH
+    | ATOMIC
     | ATTRIBUTE
     | BACKWARD
     | BEFORE
@@ -377,6 +378,7 @@ unreservedWord
     | REPLACE
     | REPLICA
     | RESET
+    | RETURN
     | RESTART
     | RESTRICT
     | RETURN
@@ -507,6 +509,7 @@ unreservedWord
     | TABLE
     | CONSTRAINT
     | COLLATION
+    | USAGE
     | SOURCE
     | TARGET
     ;
diff --git 
a/parser/sql/engine/dialect/postgresql/src/main/antlr4/imports/postgresql/DDLStatement.g4
 
b/parser/sql/engine/dialect/postgresql/src/main/antlr4/imports/postgresql/DDLStatement.g4
index 5a39775f545..8c8df6caf4e 100644
--- 
a/parser/sql/engine/dialect/postgresql/src/main/antlr4/imports/postgresql/DDLStatement.g4
+++ 
b/parser/sql/engine/dialect/postgresql/src/main/antlr4/imports/postgresql/DDLStatement.g4
@@ -128,7 +128,7 @@ columnElem
     ;
 
 dropDatabase
-    : DROP DATABASE ifExists? name (WITH? LP_ FORCE RP_)?
+    : DROP DATABASE ifExists? name (WITH? LP_ FORCE (COMMA_ FORCE)* RP_)?
     ;
 
 dropGroup
@@ -445,7 +445,7 @@ modifyColumnSpecification
     | modifyColumn DROP IDENTITY ifExists?
     | modifyColumn SET STATISTICS NUMBER_
     | modifyColumn SET LP_ attributeOptions RP_
-    | modifyColumn RESET LP_ attributeOptions RP_
+    | modifyColumn RESET reloptions
     | modifyColumn SET STORAGE (PLAIN | EXTERNAL | EXTENDED | MAIN | DEFAULT)
     ;
 
@@ -1051,7 +1051,8 @@ alterPublication
     ( RENAME TO name
     | OWNER TO roleSpec
     | SET definition
-    | (ADD | SET | DROP) publicationObjectList)
+    | (ADD | DROP) publicationObjectList
+    | SET (publicationObjectList | publicationAllObjectList))
     ;
 
 alterRoutine
@@ -1511,11 +1512,11 @@ sqlRoutineBodyStatement
     ;
 
 createPublication
-    : CREATE PUBLICATION name publicationForTables?    (WITH definition)?
+    : CREATE PUBLICATION name publicationForTables? (WITH definition)?
     ;
 
 publicationForTables
-    : FOR publicationObjectList | FOR ALL TABLES
+    : FOR (publicationObjectList | publicationAllObjectList)
     ;
 
 publicationObjectList
@@ -1535,6 +1536,15 @@ publicationSchema
     : colId | CURRENT_SCHEMA
     ;
 
+publicationAllObjectList
+    : publicationAllObject (COMMA_ publicationAllObject)*
+    ;
+
+publicationAllObject
+    : ALL TABLES (EXCEPT LP_ TABLE relationExpr (COMMA_ TABLE? relationExpr)* 
RP_)?
+    | ALL SEQUENCES
+    ;
+
 createRule
     : CREATE (OR REPLACE)? RULE name AS ON event TO qualifiedName (WHERE 
aExpr)?
       DO (INSTEAD | ALSO)? ruleActionList
@@ -1636,7 +1646,7 @@ createStatistics
     ;
 
 createSubscription
-    : CREATE SUBSCRIPTION name CONNECTION STRING_ PUBLICATION 
publicationNameList (WITH definition)?
+    : CREATE SUBSCRIPTION name (CONNECTION STRING_ | SERVER name) PUBLICATION 
publicationNameList (WITH definition)?
     ;
 
 createTablespace
@@ -2068,6 +2078,7 @@ privilegeType
     | EXECUTE
     | USAGE
     | ALL PRIVILEGES?
+    | colId
     ;
 
 alterSchema
diff --git 
a/parser/sql/engine/dialect/postgresql/src/main/antlr4/imports/postgresql/PostgreSQLKeyword.g4
 
b/parser/sql/engine/dialect/postgresql/src/main/antlr4/imports/postgresql/PostgreSQLKeyword.g4
index c8d73897d9e..b44d99bd7cf 100644
--- 
a/parser/sql/engine/dialect/postgresql/src/main/antlr4/imports/postgresql/PostgreSQLKeyword.g4
+++ 
b/parser/sql/engine/dialect/postgresql/src/main/antlr4/imports/postgresql/PostgreSQLKeyword.g4
@@ -1521,6 +1521,14 @@ DESCRIPTOR
     : D E S C R I P T O R
     ;
 
+ATOMIC
+    : A T O M I C
+    ;
+
+RETURN
+    : R E T U R N
+    ;
+
 SOURCE
     : S O U R C E
     ;
diff --git 
a/parser/sql/engine/dialect/postgresql/src/main/antlr4/org/apache/shardingsphere/sql/parser/autogen/PostgreSQLStatementParser.g4
 
b/parser/sql/engine/dialect/postgresql/src/main/antlr4/org/apache/shardingsphere/sql/parser/autogen/PostgreSQLStatementParser.g4
index 7d09a600d03..ce8e306220c 100644
--- 
a/parser/sql/engine/dialect/postgresql/src/main/antlr4/org/apache/shardingsphere/sql/parser/autogen/PostgreSQLStatementParser.g4
+++ 
b/parser/sql/engine/dialect/postgresql/src/main/antlr4/org/apache/shardingsphere/sql/parser/autogen/PostgreSQLStatementParser.g4
@@ -196,6 +196,16 @@ execute
     | alterTrigger
     | createPublication
     | checkpoint
+    | alterEventTrigger
+    | alterLargeObject
+    | alterSystem
+    | alterUserMapping
+    | createSubscription
+    | createTransform
+    | createUserMapping
+    | dropUserMapping
+    | createOperatorClass
+    | createOperatorFamily
     | emptyStatement
     | open
     ) SEMI_? EOF
diff --git 
a/parser/sql/engine/dialect/postgresql/src/main/java/org/apache/shardingsphere/sql/parser/engine/postgresql/visitor/statement/type/PostgreSQLDDLStatementVisitor.java
 
b/parser/sql/engine/dialect/postgresql/src/main/java/org/apache/shardingsphere/sql/parser/engine/postgresql/visitor/statement/type/PostgreSQLDDLStatementVisitor.java
index 4a99422cb4b..d650139bb35 100644
--- 
a/parser/sql/engine/dialect/postgresql/src/main/java/org/apache/shardingsphere/sql/parser/engine/postgresql/visitor/statement/type/PostgreSQLDDLStatementVisitor.java
+++ 
b/parser/sql/engine/dialect/postgresql/src/main/java/org/apache/shardingsphere/sql/parser/engine/postgresql/visitor/statement/type/PostgreSQLDDLStatementVisitor.java
@@ -19,6 +19,7 @@ package 
org.apache.shardingsphere.sql.parser.engine.postgresql.visitor.statement
 
 import org.antlr.v4.runtime.ParserRuleContext;
 import org.antlr.v4.runtime.misc.Interval;
+import org.antlr.v4.runtime.tree.ParseTree;
 import org.apache.shardingsphere.database.connector.core.type.DatabaseType;
 import org.apache.shardingsphere.sql.parser.api.ASTNode;
 import 
org.apache.shardingsphere.sql.parser.api.visitor.statement.type.DDLStatementVisitor;
@@ -57,6 +58,7 @@ import 
org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.Al
 import 
org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.AlterServerContext;
 import 
org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.AlterStatisticsContext;
 import 
org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.AlterSubscriptionContext;
+import 
org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.AlterSystemContext;
 import 
org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.AlterTableActionContext;
 import 
org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.AlterTableContext;
 import 
org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.AlterTablespaceContext;
@@ -76,6 +78,7 @@ import 
org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.Cl
 import 
org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.ColumnConstraintContext;
 import 
org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.ColumnDefinitionContext;
 import 
org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.ColumnNameContext;
+import 
org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.ColumnrefContext;
 import 
org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.CommentContext;
 import 
org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.CountContext;
 import 
org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.CreateAccessMethodContext;
@@ -221,7 +224,6 @@ import 
org.apache.shardingsphere.sql.parser.statement.core.segment.ddl.table.Ren
 import 
org.apache.shardingsphere.sql.parser.statement.core.segment.dml.column.ColumnSegment;
 import 
org.apache.shardingsphere.sql.parser.statement.core.segment.dml.expr.ExpressionSegment;
 import 
org.apache.shardingsphere.sql.parser.statement.core.segment.dml.expr.FunctionSegment;
-import 
org.apache.shardingsphere.sql.parser.statement.core.segment.dml.expr.TypeCastExpression;
 import 
org.apache.shardingsphere.sql.parser.statement.core.segment.generic.DataTypeSegment;
 import 
org.apache.shardingsphere.sql.parser.statement.core.segment.generic.NameSegment;
 import 
org.apache.shardingsphere.sql.parser.statement.core.segment.generic.OwnerSegment;
@@ -295,6 +297,7 @@ import 
org.apache.shardingsphere.sql.parser.statement.postgresql.ddl.PostgreSQLA
 import 
org.apache.shardingsphere.sql.parser.statement.postgresql.ddl.PostgreSQLAlterLargeObjectStatement;
 import 
org.apache.shardingsphere.sql.parser.statement.postgresql.ddl.PostgreSQLAlterOperatorClassStatement;
 import 
org.apache.shardingsphere.sql.parser.statement.postgresql.ddl.PostgreSQLAlterOperatorFamilyStatement;
+import 
org.apache.shardingsphere.sql.parser.statement.postgresql.ddl.PostgreSQLAlterSystemStatement;
 import 
org.apache.shardingsphere.sql.parser.statement.postgresql.ddl.PostgreSQLAlterUserMappingStatement;
 import 
org.apache.shardingsphere.sql.parser.statement.postgresql.ddl.PostgreSQLClusterStatement;
 import 
org.apache.shardingsphere.sql.parser.statement.postgresql.ddl.PostgreSQLCreateOperatorClassStatement;
@@ -768,22 +771,22 @@ public final class PostgreSQLDDLStatementVisitor extends 
PostgreSQLStatementVisi
                 result.getValue().add(new 
ColumnSegment(each.colId().start.getStartIndex(), 
each.colId().stop.getStopIndex(), 
createIdentifierValue(each.colId().getText())));
             }
             if (null != each.functionExprWindowless()) {
-                ExpressionSegment expression = (ExpressionSegment) 
visit(each.functionExprWindowless());
-                if (expression instanceof TypeCastExpression) {
-                    
result.getValue().addAll(ColumnExtractor.extract(expression));
-                    continue;
-                }
-                FunctionSegment functionSegment = (FunctionSegment) expression;
-                functionSegment.getParameters().forEach(param -> {
-                    if (param instanceof ColumnSegment) {
-                        result.getValue().add((ColumnSegment) param);
-                    }
-                });
+                appendIndexExpressionColumns(each.functionExprWindowless(), 
result.getValue());
             }
         }
         return result;
     }
     
+    private void appendIndexExpressionColumns(final ParseTree expression, 
final Collection<ColumnSegment> columns) {
+        if (expression instanceof ColumnrefContext) {
+            columns.addAll(ColumnExtractor.extract((ExpressionSegment) 
visit(expression)));
+            return;
+        }
+        for (int index = 0; index < expression.getChildCount(); index++) {
+            appendIndexExpressionColumns(expression.getChild(index), columns);
+        }
+    }
+    
     @Override
     public ASTNode visitFunctionExprWindowless(final 
FunctionExprWindowlessContext ctx) {
         if (null == ctx.funcApplication()) {
@@ -925,6 +928,11 @@ public final class PostgreSQLDDLStatementVisitor extends 
PostgreSQLStatementVisi
         return new PostgreSQLCreateUserMappingStatement(getDatabaseType());
     }
     
+    @Override
+    public ASTNode visitAlterSystem(final AlterSystemContext ctx) {
+        return new PostgreSQLAlterSystemStatement(getDatabaseType());
+    }
+    
     @Override
     public ASTNode visitAlterUserMapping(final AlterUserMappingContext ctx) {
         return new PostgreSQLAlterUserMappingStatement(getDatabaseType());
@@ -1004,7 +1012,7 @@ public final class PostgreSQLDDLStatementVisitor extends 
PostgreSQLStatementVisi
     @Override
     public ASTNode visitDropDatabase(final DropDatabaseContext ctx) {
         DropDatabaseStatement result = new 
DropDatabaseStatement(getDatabaseType(), ((IdentifierValue) 
visit(ctx.name())).getValue(), null != ctx.ifExists());
-        result.setForce(null != ctx.FORCE());
+        result.setForce(null != ctx.LP_());
         return result;
     }
     
diff --git 
a/parser/sql/statement/dialect/postgresql/src/main/java/org/apache/shardingsphere/sql/parser/statement/postgresql/ddl/PostgreSQLAlterSystemStatement.java
 
b/parser/sql/statement/dialect/postgresql/src/main/java/org/apache/shardingsphere/sql/parser/statement/postgresql/ddl/PostgreSQLAlterSystemStatement.java
new file mode 100644
index 00000000000..05e04eec9f7
--- /dev/null
+++ 
b/parser/sql/statement/dialect/postgresql/src/main/java/org/apache/shardingsphere/sql/parser/statement/postgresql/ddl/PostgreSQLAlterSystemStatement.java
@@ -0,0 +1,31 @@
+/*
+ * 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.statement.postgresql.ddl;
+
+import org.apache.shardingsphere.database.connector.core.type.DatabaseType;
+import 
org.apache.shardingsphere.sql.parser.statement.core.statement.type.ddl.DDLStatement;
+
+/**
+ * Alter system statement for PostgreSQL.
+ */
+public final class PostgreSQLAlterSystemStatement extends DDLStatement {
+    
+    public PostgreSQLAlterSystemStatement(final DatabaseType databaseType) {
+        super(databaseType);
+    }
+}
diff --git 
a/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/asserts/statement/ddl/dialect/postgresql/PostgreSQLDDLStatementAssert.java
 
b/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/asserts/statement/ddl/dialect/postgresql/PostgreSQLDDLStatementAssert.java
index d87b105e8aa..e24bf3d2cdf 100644
--- 
a/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/asserts/statement/ddl/dialect/postgresql/PostgreSQLDDLStatementAssert.java
+++ 
b/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/asserts/statement/ddl/dialect/postgresql/PostgreSQLDDLStatementAssert.java
@@ -37,6 +37,7 @@ import 
org.apache.shardingsphere.sql.parser.statement.postgresql.ddl.PostgreSQLA
 import 
org.apache.shardingsphere.sql.parser.statement.postgresql.ddl.PostgreSQLAlterLargeObjectStatement;
 import 
org.apache.shardingsphere.sql.parser.statement.postgresql.ddl.PostgreSQLAlterOperatorClassStatement;
 import 
org.apache.shardingsphere.sql.parser.statement.postgresql.ddl.PostgreSQLAlterOperatorFamilyStatement;
+import 
org.apache.shardingsphere.sql.parser.statement.postgresql.ddl.PostgreSQLAlterSystemStatement;
 import 
org.apache.shardingsphere.sql.parser.statement.postgresql.ddl.PostgreSQLAlterUserMappingStatement;
 import 
org.apache.shardingsphere.sql.parser.statement.postgresql.ddl.PostgreSQLClusterStatement;
 import 
org.apache.shardingsphere.sql.parser.statement.postgresql.ddl.PostgreSQLCreateOperatorClassStatement;
@@ -78,6 +79,7 @@ import 
org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.s
 import 
org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.statement.ddl.dialect.postgresql.PostgreSQLAlterLargeObjectStatementTestCase;
 import 
org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.statement.ddl.dialect.postgresql.PostgreSQLAlterOperatorClassStatementTestCase;
 import 
org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.statement.ddl.dialect.postgresql.PostgreSQLAlterOperatorFamilyStatementTestCase;
+import 
org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.statement.ddl.dialect.postgresql.PostgreSQLAlterSystemStatementTestCase;
 import 
org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.statement.ddl.dialect.postgresql.PostgreSQLAlterUserMappingStatementTestCase;
 import 
org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.statement.ddl.dialect.postgresql.PostgreSQLClusterStatementTestCase;
 import 
org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.statement.ddl.dialect.postgresql.PostgreSQLCreateOperatorClassStatementTestCase;
@@ -175,6 +177,8 @@ public final class PostgreSQLDDLStatementAssert {
             assertThat(assertContext.getText("Create transform statement type 
assertion error."), actual, isA(PostgreSQLCreateTransformStatement.class));
         } else if (expected instanceof 
PostgreSQLAlterLargeObjectStatementTestCase) {
             assertThat(assertContext.getText("Alter large object statement 
type assertion error."), actual, 
isA(PostgreSQLAlterLargeObjectStatement.class));
+        } else if (expected instanceof PostgreSQLAlterSystemStatementTestCase) 
{
+            assertThat(assertContext.getText("Alter system statement type 
assertion error."), actual, isA(PostgreSQLAlterSystemStatement.class));
         } else if (expected instanceof 
PostgreSQLCreateStatisticsStatementTestCase) {
             assertThat(assertContext.getText("Create statistics statement type 
assertion error."), actual, isA(PostgreSQLCreateStatisticsStatement.class));
         } else if (expected instanceof 
PostgreSQLCreateSubscriptionStatementTestCase) {
diff --git 
a/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/asserts/statement/ddl/standard/StandardDDLStatementAssert.java
 
b/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/asserts/statement/ddl/standard/StandardDDLStatementAssert.java
index 7ab6c68a99c..7971e3dcfe1 100644
--- 
a/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/asserts/statement/ddl/standard/StandardDDLStatementAssert.java
+++ 
b/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/asserts/statement/ddl/standard/StandardDDLStatementAssert.java
@@ -45,6 +45,7 @@ import 
org.apache.shardingsphere.sql.parser.statement.core.statement.type.ddl.pk
 import 
org.apache.shardingsphere.sql.parser.statement.core.statement.type.ddl.pkg.DropPackageStatement;
 import 
org.apache.shardingsphere.sql.parser.statement.core.statement.type.ddl.procedure.CreateProcedureStatement;
 import 
org.apache.shardingsphere.sql.parser.statement.core.statement.type.ddl.sequence.CreateSequenceStatement;
+import 
org.apache.shardingsphere.sql.parser.statement.core.statement.type.ddl.server.CreateServerStatement;
 import 
org.apache.shardingsphere.sql.parser.statement.core.statement.type.ddl.synonym.AlterSynonymStatement;
 import 
org.apache.shardingsphere.sql.parser.statement.core.statement.type.ddl.table.AlterTableStatement;
 import 
org.apache.shardingsphere.sql.parser.statement.core.statement.type.ddl.table.CreateTableStatement;
@@ -118,6 +119,7 @@ import 
org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.s
 import 
org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.statement.ddl.standard.index.CreateIndexStatementTestCase;
 import 
org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.statement.ddl.standard.index.DropIndexStatementTestCase;
 import 
org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.statement.ddl.standard.sequence.CreateSequenceStatementTestCase;
+import 
org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.statement.ddl.standard.server.CreateServerStatementTestCase;
 import 
org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.statement.ddl.standard.synonym.AlterSynonymStatementTestCase;
 import 
org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.statement.ddl.standard.table.AlterTableStatementTestCase;
 import 
org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.statement.ddl.standard.table.CreateTableStatementTestCase;
@@ -133,6 +135,9 @@ import 
org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.s
 import 
org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.statement.ddl.standard.view.RefreshMatViewStmtStatementTestCase;
 import 
org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.statement.plsql.CreateProcedureTestCase;
 
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.isA;
+
 /**
  * Standard DDL statement assert.
  */
@@ -147,7 +152,9 @@ public final class StandardDDLStatementAssert {
      * @param expected expected parser result
      */
     public static void assertIs(final SQLCaseAssertContext assertContext, 
final DDLStatement actual, final SQLParserTestCase expected) {
-        if (actual instanceof CreateTableStatement) {
+        if (expected instanceof CreateServerStatementTestCase) {
+            assertThat(actual, isA(CreateServerStatement.class));
+        } else if (actual instanceof CreateTableStatement) {
             CreateTableStatementAssert.assertIs(assertContext, 
(CreateTableStatement) actual, (CreateTableStatementTestCase) expected);
         } else if (actual instanceof AlterTableStatement) {
             AlterTableStatementAssert.assertIs(assertContext, 
(AlterTableStatement) actual, (AlterTableStatementTestCase) expected);
diff --git 
a/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/cases/parser/jaxb/RootSQLParserTestCases.java
 
b/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/cases/parser/jaxb/RootSQLParserTestCases.java
index 4320f0fceda..f8dcd6fcebc 100644
--- 
a/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/cases/parser/jaxb/RootSQLParserTestCases.java
+++ 
b/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/cases/parser/jaxb/RootSQLParserTestCases.java
@@ -257,6 +257,7 @@ import 
org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.s
 import 
org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.statement.ddl.dialect.postgresql.PostgreSQLAlterLargeObjectStatementTestCase;
 import 
org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.statement.ddl.dialect.postgresql.PostgreSQLAlterOperatorClassStatementTestCase;
 import 
org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.statement.ddl.dialect.postgresql.PostgreSQLAlterOperatorFamilyStatementTestCase;
+import 
org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.statement.ddl.dialect.postgresql.PostgreSQLAlterSystemStatementTestCase;
 import 
org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.statement.ddl.dialect.postgresql.PostgreSQLAlterUserMappingStatementTestCase;
 import 
org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.statement.ddl.dialect.postgresql.PostgreSQLClusterStatementTestCase;
 import 
org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.statement.ddl.dialect.postgresql.PostgreSQLCreateOperatorClassStatementTestCase;
@@ -1081,6 +1082,9 @@ public final class RootSQLParserTestCases {
     @XmlElement(name = "create-dimension")
     private final List<OracleCreateDimensionStatementTestCase> 
createDimensionTestCases = new LinkedList<>();
     
+    @XmlElement(name = "postgresql-alter-system")
+    private final List<PostgreSQLAlterSystemStatementTestCase> 
postgresqlAlterSystemTestCases = new LinkedList<>();
+    
     @XmlElement(name = "create-statistics")
     private final List<PostgreSQLCreateStatisticsStatementTestCase> 
createStatisticsTestCases = new LinkedList<>();
     
diff --git 
a/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/cases/parser/jaxb/statement/ddl/dialect/postgresql/PostgreSQLAlterSystemStatementTestCase.java
 
b/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/cases/parser/jaxb/statement/ddl/dialect/postgresql/PostgreSQLAlterSystemStatementTestCase.java
new file mode 100644
index 00000000000..ab2f348fa08
--- /dev/null
+++ 
b/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/cases/parser/jaxb/statement/ddl/dialect/postgresql/PostgreSQLAlterSystemStatementTestCase.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.it.sql.parser.internal.cases.parser.jaxb.statement.ddl.dialect.postgresql;
+
+import 
org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.SQLParserTestCase;
+
+/**
+ * Alter system statement test case for PostgreSQL.
+ */
+public final class PostgreSQLAlterSystemStatementTestCase extends 
SQLParserTestCase {
+}
diff --git a/test/it/parser/src/main/resources/case/dal/reset.xml 
b/test/it/parser/src/main/resources/case/dal/reset.xml
index f0b6100531c..5401d8e6172 100644
--- a/test/it/parser/src/main/resources/case/dal/reset.xml
+++ b/test/it/parser/src/main/resources/case/dal/reset.xml
@@ -46,4 +46,16 @@
     <reset-persist sql-case-id="reset_persist" />
     <reset-persist sql-case-id="reset_persist_identifier" identifier="TEST_ID" 
/>
     <reset-persist sql-case-id="reset_persist_exist_identifier" 
if-exists="true" identifier="TEST_ID" />
+    <reset-parameter sql-case-id="reset_session_authorization_pg" 
configuration-parameter="session_authorization" />
+    <reset-parameter sql-case-id="reset_session_authorization_lowercase_pg" 
configuration-parameter="session_authorization" />
+
+    <reset-parameter sql-case-id="reset_session_authorization_comments_pg" 
configuration-parameter="session_authorization">
+        <comment start-index="6" stop-index="14" text="/* foo */" />
+        <comment start-index="24" stop-index="32" text="/* bar */" />
+    </reset-parameter>
+    <reset-parameter sql-case-id="reset_time_zone_pg" 
configuration-parameter="timezone" />
+    <reset-parameter sql-case-id="reset_dotted_pg" 
configuration-parameter="custom.my_guc" />
+    <reset-parameter sql-case-id="reset_quoted_dotted_pg" 
configuration-parameter="&quot;foo&quot;.&quot;bar&quot;" />
+    <reset-parameter sql-case-id="reset_session_parameter_pg" 
configuration-parameter="session" />
+    <reset-parameter sql-case-id="reset_time_parameter_pg" 
configuration-parameter="time" />
 </sql-parser-test-cases>
diff --git a/test/it/parser/src/main/resources/case/dcl/grant.xml 
b/test/it/parser/src/main/resources/case/dcl/grant.xml
index d329742a28d..fdf23ef273e 100644
--- a/test/it/parser/src/main/resources/case/dcl/grant.xml
+++ b/test/it/parser/src/main/resources/case/dcl/grant.xml
@@ -332,4 +332,32 @@
     <grant sql-case-id="grant_role_option_keyword_postgresql" />
     <grant sql-case-id="grant_global_spaced_wildcard" />
     <grant sql-case-id="grant_database_spaced_wildcard" />
+
+    <grant sql-case-id="grant_maintain_pg">
+        <table name="t" start-index="18" stop-index="18" />
+    </grant>
+
+    <grant sql-case-id="grant_maintain_multiple_pg">
+        <table name="t" start-index="32" stop-index="34">
+            <owner name="s" start-index="32" stop-index="32" />
+        </table>
+    </grant>
+
+    <grant sql-case-id="grant_named_privilege_pg">
+        <table name="t" start-index="26" stop-index="26" />
+    </grant>
+
+    <grant sql-case-id="grant_granted_by_pg">
+        <table name="t" start-index="16" stop-index="16" />
+    </grant>
+
+    <grant sql-case-id="grant_select_privilege_control_pg">
+        <table name="t" start-index="16" stop-index="16" />
+    </grant>
+    <grant sql-case-id="grant_role_privilege_control_pg" />
+    <grant sql-case-id="grant_role_admin_true_pg" />
+    <grant sql-case-id="grant_role_admin_false_pg" />
+    <grant sql-case-id="grant_role_inherit_set_pg" />
+    <grant sql-case-id="grant_role_options_grantor_pg" />
+    <grant sql-case-id="grant_role_admin_option_control_pg" />
 </sql-parser-test-cases>
diff --git a/test/it/parser/src/main/resources/case/dcl/revoke.xml 
b/test/it/parser/src/main/resources/case/dcl/revoke.xml
index 3d92d9524c6..f9e690d2bba 100644
--- a/test/it/parser/src/main/resources/case/dcl/revoke.xml
+++ b/test/it/parser/src/main/resources/case/dcl/revoke.xml
@@ -266,6 +266,21 @@
         <table name="t_order" start-index="28" stop-index="34" />
         <column name="order_id" start-index="14" stop-index="21" />
     </revoke>
+
+    <revoke sql-case-id="revoke_maintain_pg">
+        <table name="t" start-index="19" stop-index="19" />
+    </revoke>
+
+    <revoke sql-case-id="revoke_granted_by_pg">
+        <table name="t" start-index="17" stop-index="17" />
+    </revoke>
+    <revoke sql-case-id="revoke_role_inherit_pg" />
+    <revoke sql-case-id="revoke_role_set_grantor_pg" />
+    <revoke sql-case-id="revoke_role_admin_option_control_pg" />
+
+    <revoke sql-case-id="revoke_object_grant_option_control_pg">
+        <table name="t" start-index="34" stop-index="34" />
+    </revoke>
     <revoke sql-case-id="revoke_maintain_on_table_postgresql">
         <table name="foo" start-index="19" stop-index="32">
             <owner name="foo_schema" start-index="19" stop-index="28" />
diff --git 
a/test/it/parser/src/main/resources/case/ddl/alter-default-privileges.xml 
b/test/it/parser/src/main/resources/case/ddl/alter-default-privileges.xml
index c4c93cddee9..74b9fd25334 100644
--- a/test/it/parser/src/main/resources/case/ddl/alter-default-privileges.xml
+++ b/test/it/parser/src/main/resources/case/ddl/alter-default-privileges.xml
@@ -21,4 +21,6 @@
     <alter-default-privileges 
sql-case-id="alter_default_privileges_revoke_delete" />
     <alter-default-privileges 
sql-case-id="alter_default_privileges_grant_insert" />
     <alter-default-privileges 
sql-case-id="alter_default_privileges_revoke_insert" />
+    <alter-default-privileges sql-case-id="alter_default_usage_schemas_pg" />
+    <alter-default-privileges sql-case-id="alter_default_usage_types_pg" />
 </sql-parser-test-cases>
diff --git a/test/it/parser/src/main/resources/case/ddl/create-server.xml 
b/test/it/parser/src/main/resources/case/ddl/alter-event-trigger.xml
similarity index 80%
copy from test/it/parser/src/main/resources/case/ddl/create-server.xml
copy to test/it/parser/src/main/resources/case/ddl/alter-event-trigger.xml
index 922a53d667e..e2543c231b9 100644
--- a/test/it/parser/src/main/resources/case/ddl/create-server.xml
+++ b/test/it/parser/src/main/resources/case/ddl/alter-event-trigger.xml
@@ -17,6 +17,7 @@
   -->
 
 <sql-parser-test-cases>
-<!--    <create-server sql-case-id="create_server" />-->
-    <create-server sql-case-id="create_server_doris_basic" />
+    <alter-event-trigger sql-case-id="alter_event_trigger_enable_pg" />
+    <alter-event-trigger sql-case-id="alter_event_trigger_owner_pg" />
+    <alter-event-trigger sql-case-id="alter_event_trigger_default_enable_pg" />
 </sql-parser-test-cases>
diff --git a/test/it/parser/src/main/resources/case/ddl/create-server.xml 
b/test/it/parser/src/main/resources/case/ddl/alter-large-object.xml
similarity index 88%
copy from test/it/parser/src/main/resources/case/ddl/create-server.xml
copy to test/it/parser/src/main/resources/case/ddl/alter-large-object.xml
index 922a53d667e..ef7ddab6a81 100644
--- a/test/it/parser/src/main/resources/case/ddl/create-server.xml
+++ b/test/it/parser/src/main/resources/case/ddl/alter-large-object.xml
@@ -17,6 +17,5 @@
   -->
 
 <sql-parser-test-cases>
-<!--    <create-server sql-case-id="create_server" />-->
-    <create-server sql-case-id="create_server_doris_basic" />
+    <alter-large-object sql-case-id="alter_large_object_owner_pg" />
 </sql-parser-test-cases>
diff --git a/test/it/parser/src/main/resources/case/ddl/alter-operator.xml 
b/test/it/parser/src/main/resources/case/ddl/alter-operator.xml
index 9f5c5ed9ec6..115a9c505b4 100644
--- a/test/it/parser/src/main/resources/case/ddl/alter-operator.xml
+++ b/test/it/parser/src/main/resources/case/ddl/alter-operator.xml
@@ -23,4 +23,12 @@
     <alter-operator sql-case-id="alter_operator_set_restrict_join" />
     <alter-operator sql-case-id="alter_operator_compile" />
     <alter-operator 
sql-case-id="alter_operator_add_binding_return_number_using" />
+    <alter-operator-class sql-case-id="alter_operator_class_owner_pg" />
+    <alter-operator-class sql-case-id="alter_operator_class_rename_pg" />
+    <alter-operator-class sql-case-id="alter_operator_class_schema_pg" />
+    <alter-operator-family sql-case-id="alter_operator_family_owner_pg" />
+    <alter-operator-family sql-case-id="alter_operator_family_rename_pg" />
+    <alter-operator-family sql-case-id="alter_operator_family_schema_pg" />
+    <alter-operator-family sql-case-id="alter_operator_family_add_pg" />
+    <alter-operator-family sql-case-id="alter_operator_family_drop_pg" />
 </sql-parser-test-cases>
diff --git a/test/it/parser/src/main/resources/case/ddl/alter-publication.xml 
b/test/it/parser/src/main/resources/case/ddl/alter-publication.xml
index e2b88375233..40cd3d5b5c3 100644
--- a/test/it/parser/src/main/resources/case/ddl/alter-publication.xml
+++ b/test/it/parser/src/main/resources/case/ddl/alter-publication.xml
@@ -23,4 +23,9 @@
     <alter-publication sql-case-id="alter_publication_add_table" />
     <alter-publication sql-case-id="alter_publication_drop_table" />
     <alter-publication sql-case-id="alter_publication_set_definition" />
+    <alter-publication sql-case-id="alter_publication_add_schema_pg" />
+    <alter-publication sql-case-id="alter_publication_set_filter_pg" />
+    <alter-publication sql-case-id="alter_publication_drop_schema_pg" />
+    <alter-publication sql-case-id="alter_publication_all_sequences_pg" />
+    <alter-publication sql-case-id="alter_publication_all_except_pg" />
 </sql-parser-test-cases>
diff --git a/test/it/parser/src/main/resources/case/ddl/alter-system.xml 
b/test/it/parser/src/main/resources/case/ddl/alter-system.xml
index 504827f1b9d..c8e37faef42 100644
--- a/test/it/parser/src/main/resources/case/ddl/alter-system.xml
+++ b/test/it/parser/src/main/resources/case/ddl/alter-system.xml
@@ -46,4 +46,6 @@
     <alter-system sql-case-id="alter_system_set_parameter_recyclebin_scope" />
     <alter-system sql-case-id="alter_system_set_events1" />
     <alter-system sql-case-id="alter_system_set_events2" />
+    <postgresql-alter-system sql-case-id="alter_system_set_pg" />
+    <postgresql-alter-system sql-case-id="alter_system_reset_pg" />
 </sql-parser-test-cases>
diff --git a/test/it/parser/src/main/resources/case/ddl/alter-table.xml 
b/test/it/parser/src/main/resources/case/ddl/alter-table.xml
index 05b53de7e2c..750e57f86bb 100644
--- a/test/it/parser/src/main/resources/case/ddl/alter-table.xml
+++ b/test/it/parser/src/main/resources/case/ddl/alter-table.xml
@@ -3877,4 +3877,47 @@
             <snapshot-id value="1111" start-index="35" stop-index="38" />
         </table-rollback>
     </alter-table>
+
+    <alter-table sql-case-id="alter_table_reset_option_pg">
+        <table name="t" start-index="12" stop-index="12" />
+    </alter-table>
+
+    <alter-table sql-case-id="alter_table_reset_options_namespace_pg">
+        <table name="t" start-index="12" stop-index="12" />
+    </alter-table>
+
+    <alter-table sql-case-id="alter_table_column_reset_option_pg">
+        <table name="t" start-index="12" stop-index="12" />
+        <modify-column>
+            <column-definition start-index="14" stop-index="46" 
not-null="false">
+                <column name="c" start-index="27" stop-index="27" />
+            </column-definition>
+        </modify-column>
+    </alter-table>
+
+    <alter-table sql-case-id="alter_table_column_reset_without_column_pg">
+        <table name="t" start-index="12" stop-index="12" />
+        <modify-column>
+            <column-definition start-index="14" stop-index="49" 
not-null="false">
+                <column name="c" start-index="20" stop-index="20" />
+            </column-definition>
+        </modify-column>
+    </alter-table>
+
+    <alter-table sql-case-id="alter_table_reset_set_control_pg">
+        <table name="t" start-index="12" stop-index="12" />
+    </alter-table>
+
+    <alter-table sql-case-id="alter_table_reset_value_control_pg">
+        <table name="t" start-index="12" stop-index="12" />
+    </alter-table>
+
+    <alter-table sql-case-id="alter_table_column_reset_value_control_pg">
+        <table name="t" start-index="12" stop-index="12" />
+        <modify-column>
+            <column-definition start-index="14" stop-index="52" 
not-null="false">
+                <column name="c" start-index="27" stop-index="27" />
+            </column-definition>
+        </modify-column>
+    </alter-table>
 </sql-parser-test-cases>
diff --git a/test/it/parser/src/main/resources/case/ddl/create-server.xml 
b/test/it/parser/src/main/resources/case/ddl/alter-user-mapping.xml
similarity index 87%
copy from test/it/parser/src/main/resources/case/ddl/create-server.xml
copy to test/it/parser/src/main/resources/case/ddl/alter-user-mapping.xml
index 922a53d667e..65788609524 100644
--- a/test/it/parser/src/main/resources/case/ddl/create-server.xml
+++ b/test/it/parser/src/main/resources/case/ddl/alter-user-mapping.xml
@@ -17,6 +17,6 @@
   -->
 
 <sql-parser-test-cases>
-<!--    <create-server sql-case-id="create_server" />-->
-    <create-server sql-case-id="create_server_doris_basic" />
+    <alter-user-mapping sql-case-id="alter_user_mapping_set_pg" />
+    <alter-user-mapping sql-case-id="alter_user_mapping_drop_pg" />
 </sql-parser-test-cases>
diff --git a/test/it/parser/src/main/resources/case/ddl/create-function.xml 
b/test/it/parser/src/main/resources/case/ddl/create-function.xml
index de7d86ad30b..ce241141a37 100644
--- a/test/it/parser/src/main/resources/case/ddl/create-function.xml
+++ b/test/it/parser/src/main/resources/case/ddl/create-function.xml
@@ -213,4 +213,13 @@
         </sql-statements>
     </create-function>
     <create-function sql-case-id="create_function_if_not_exists_mysql" />
+    <create-function sql-case-id="create_function_return_expression_pg" />
+    <create-function sql-case-id="create_function_return_subquery_pg" />
+    <create-function sql-case-id="create_function_atomic_empty_pg" />
+    <create-function sql-case-id="create_function_atomic_return_pg" />
+    <create-function sql-case-id="create_function_atomic_select_pg" />
+    <create-function sql-case-id="create_function_atomic_dml_pg" />
+    <create-function sql-case-id="create_function_atomic_merge_pg" />
+    <create-function sql-case-id="create_function_atomic_table_pg" />
+    <create-function sql-case-id="create_function_body_string_control_pg" />
 </sql-parser-test-cases>
diff --git a/test/it/parser/src/main/resources/case/ddl/create-index.xml 
b/test/it/parser/src/main/resources/case/ddl/create-index.xml
index 7778f2b1773..5e13abab80d 100644
--- a/test/it/parser/src/main/resources/case/ddl/create-index.xml
+++ b/test/it/parser/src/main/resources/case/ddl/create-index.xml
@@ -483,4 +483,71 @@
         </table>
         <column start-index="35" stop-index="39" name="col_a" />
     </create-index>
+
+    <create-index sql-case-id="create_index_empty_function_pg">
+        <table>
+            <simple-table name="foo_table" start-index="24" stop-index="32" />
+        </table>
+        <index name="foo_idx" start-index="13" stop-index="19" />
+    </create-index>
+
+    <create-index sql-case-id="create_index_common_function_pg">
+        <table>
+            <simple-table name="foo_table" start-index="24" stop-index="32" />
+        </table>
+        <index name="foo_idx" start-index="13" stop-index="19" />
+        <column name="a" start-index="44" stop-index="44" />
+        <column name="b" start-index="57" stop-index="57" />
+    </create-index>
+
+    <create-index sql-case-id="create_index_cast_expression_pg">
+        <table>
+            <simple-table name="foo_table" start-index="24" stop-index="32" />
+        </table>
+        <index name="foo_idx" start-index="13" stop-index="19" />
+        <column name="a" start-index="40" stop-index="40" />
+    </create-index>
+
+    <create-index sql-case-id="create_index_nested_cast_pg">
+        <table>
+            <simple-table name="foo_table" start-index="24" stop-index="32" />
+        </table>
+        <index name="foo_idx" start-index="13" stop-index="19" />
+        <column name="a" start-index="45" stop-index="45" />
+    </create-index>
+
+    <create-index sql-case-id="create_index_function_cast_pg">
+        <table>
+            <simple-table name="foo_table" start-index="24" stop-index="32" />
+        </table>
+        <index name="foo_idx" start-index="13" stop-index="19" />
+        <column name="a" start-index="49" stop-index="49" />
+    </create-index>
+
+    <create-index sql-case-id="create_index_cast_binary_pg">
+        <table>
+            <simple-table name="foo_table" start-index="24" stop-index="32" />
+        </table>
+        <index name="foo_idx" start-index="13" stop-index="19" />
+        <column name="a" start-index="40" stop-index="40" />
+        <column name="b" start-index="49" stop-index="49" />
+    </create-index>
+
+    <create-index sql-case-id="create_index_nested_function_cast_pg">
+        <table>
+            <simple-table name="foo_table" start-index="24" stop-index="32" />
+        </table>
+        <index name="foo_idx" start-index="13" stop-index="19" />
+        <column name="b" start-index="53" stop-index="53" />
+        <column name="a" start-index="74" stop-index="74" />
+        <column name="b" start-index="89" stop-index="89" />
+    </create-index>
+
+    <create-index sql-case-id="create_index_array_subscript_function_pg">
+        <table>
+            <simple-table name="foo_table" start-index="24" stop-index="32" />
+        </table>
+        <index name="foo_idx" start-index="13" stop-index="19" />
+        <column name="a" start-index="39" stop-index="39" />
+    </create-index>
 </sql-parser-test-cases>
diff --git a/test/it/parser/src/main/resources/case/ddl/create-operator.xml 
b/test/it/parser/src/main/resources/case/ddl/create-operator.xml
index 0b5aa9c7fad..029c5094647 100644
--- a/test/it/parser/src/main/resources/case/ddl/create-operator.xml
+++ b/test/it/parser/src/main/resources/case/ddl/create-operator.xml
@@ -25,4 +25,8 @@
     <create-operator 
sql-case-id="create_operator_with_binding_custom_datatype" />
     <create-operator sql-case-id="create_operator_with_compute_ancillary_data" 
/>
     <create-operator sql-case-id="create_operator_with_single_binding" />
+    <create-operator-class sql-case-id="create_operator_class_basic_pg" />
+    <create-operator-class sql-case-id="create_operator_class_default_pg" />
+    <create-operator-family sql-case-id="create_operator_family_basic_pg" />
+    <create-operator-family sql-case-id="create_operator_family_schema_pg" />
 </sql-parser-test-cases>
diff --git a/test/it/parser/src/main/resources/case/ddl/create-procedure.xml 
b/test/it/parser/src/main/resources/case/ddl/create-procedure.xml
index 038dcfee8c0..366a2826305 100644
--- a/test/it/parser/src/main/resources/case/ddl/create-procedure.xml
+++ b/test/it/parser/src/main/resources/case/ddl/create-procedure.xml
@@ -368,6 +368,9 @@
         <valid-statement type="RollbackStatement" />
     </create-procedure>
     <create-procedure sql-case-id="create_procedure_flush_kill" />
+    <create-procedure sql-case-id="create_procedure_atomic_empty_pg" />
+    <create-procedure sql-case-id="create_procedure_atomic_dml_pg" />
+    <create-procedure sql-case-id="create_procedure_body_string_control_pg" />
     <plsql-block 
sql-case-id="create_plsql_block_with_schema_qualified_type_attribute">
         <table name="foo_table" start-index="18" stop-index="37" 
table-name-start-index="29" table-name-stop-index="37">
             <owner name="foo_schema" start-index="18" stop-index="27" />
diff --git a/test/it/parser/src/main/resources/case/ddl/create-publication.xml 
b/test/it/parser/src/main/resources/case/ddl/create-publication.xml
index 5cdf955c14c..6e36abea5df 100644
--- a/test/it/parser/src/main/resources/case/ddl/create-publication.xml
+++ b/test/it/parser/src/main/resources/case/ddl/create-publication.xml
@@ -20,4 +20,7 @@
     <create-publication sql-case-id="create_publication" />
     <create-publication sql-case-id="create_publication_for_all_tables" />
     <create-publication sql-case-id="create_publication_with_statement" />
+    <create-publication sql-case-id="create_publication_row_filter_pg" />
+    <create-publication sql-case-id="create_publication_schema_pg" />
+    <create-publication sql-case-id="create_publication_all_except_pg" />
 </sql-parser-test-cases>
diff --git a/test/it/parser/src/main/resources/case/ddl/create-server.xml 
b/test/it/parser/src/main/resources/case/ddl/create-server.xml
index 922a53d667e..45929a898f0 100644
--- a/test/it/parser/src/main/resources/case/ddl/create-server.xml
+++ b/test/it/parser/src/main/resources/case/ddl/create-server.xml
@@ -19,4 +19,7 @@
 <sql-parser-test-cases>
 <!--    <create-server sql-case-id="create_server" />-->
     <create-server sql-case-id="create_server_doris_basic" />
+    <create-server sql-case-id="create_server_basic_pg" />
+    <create-server sql-case-id="create_server_options_pg" />
+    <create-server sql-case-id="create_server_version_pg" />
 </sql-parser-test-cases>
diff --git a/test/it/parser/src/main/resources/case/ddl/create-server.xml 
b/test/it/parser/src/main/resources/case/ddl/create-statistics.xml
similarity index 76%
copy from test/it/parser/src/main/resources/case/ddl/create-server.xml
copy to test/it/parser/src/main/resources/case/ddl/create-statistics.xml
index 922a53d667e..6e388da0821 100644
--- a/test/it/parser/src/main/resources/case/ddl/create-server.xml
+++ b/test/it/parser/src/main/resources/case/ddl/create-statistics.xml
@@ -17,6 +17,8 @@
   -->
 
 <sql-parser-test-cases>
-<!--    <create-server sql-case-id="create_server" />-->
-    <create-server sql-case-id="create_server_doris_basic" />
+    <create-statistics sql-case-id="create_statistics_named_pg" />
+    <create-statistics sql-case-id="create_statistics_if_not_exists_pg" />
+    <create-statistics sql-case-id="create_statistics_anonymous_pg" />
+    <create-statistics sql-case-id="create_statistics_expression_pg" />
 </sql-parser-test-cases>
diff --git a/test/it/parser/src/main/resources/case/ddl/create-publication.xml 
b/test/it/parser/src/main/resources/case/ddl/create-subscription.xml
similarity index 70%
copy from test/it/parser/src/main/resources/case/ddl/create-publication.xml
copy to test/it/parser/src/main/resources/case/ddl/create-subscription.xml
index 5cdf955c14c..d4f288ad774 100644
--- a/test/it/parser/src/main/resources/case/ddl/create-publication.xml
+++ b/test/it/parser/src/main/resources/case/ddl/create-subscription.xml
@@ -17,7 +17,9 @@
   -->
 
 <sql-parser-test-cases>
-    <create-publication sql-case-id="create_publication" />
-    <create-publication sql-case-id="create_publication_for_all_tables" />
-    <create-publication sql-case-id="create_publication_with_statement" />
+    <create-subscription sql-case-id="create_subscription_connection_pg" />
+    <create-subscription sql-case-id="create_subscription_options_pg" />
+    <create-subscription sql-case-id="create_subscription_server_pg" />
+    <create-subscription sql-case-id="create_subscription_negative_option_pg" 
/>
+    <create-subscription sql-case-id="create_subscription_positive_sign_pg" />
 </sql-parser-test-cases>
diff --git a/test/it/parser/src/main/resources/case/ddl/create-server.xml 
b/test/it/parser/src/main/resources/case/ddl/create-transform.xml
similarity index 87%
copy from test/it/parser/src/main/resources/case/ddl/create-server.xml
copy to test/it/parser/src/main/resources/case/ddl/create-transform.xml
index 922a53d667e..af95b0a6982 100644
--- a/test/it/parser/src/main/resources/case/ddl/create-server.xml
+++ b/test/it/parser/src/main/resources/case/ddl/create-transform.xml
@@ -17,6 +17,6 @@
   -->
 
 <sql-parser-test-cases>
-<!--    <create-server sql-case-id="create_server" />-->
-    <create-server sql-case-id="create_server_doris_basic" />
+    <create-transform sql-case-id="create_transform_both_pg" />
+    <create-transform sql-case-id="create_transform_replace_pg" />
 </sql-parser-test-cases>
diff --git a/test/it/parser/src/main/resources/case/ddl/create-server.xml 
b/test/it/parser/src/main/resources/case/ddl/create-user-mapping.xml
similarity index 80%
copy from test/it/parser/src/main/resources/case/ddl/create-server.xml
copy to test/it/parser/src/main/resources/case/ddl/create-user-mapping.xml
index 922a53d667e..484d4cc6176 100644
--- a/test/it/parser/src/main/resources/case/ddl/create-server.xml
+++ b/test/it/parser/src/main/resources/case/ddl/create-user-mapping.xml
@@ -17,6 +17,7 @@
   -->
 
 <sql-parser-test-cases>
-<!--    <create-server sql-case-id="create_server" />-->
-    <create-server sql-case-id="create_server_doris_basic" />
+    <create-user-mapping sql-case-id="create_user_mapping_basic_pg" />
+    <create-user-mapping sql-case-id="create_user_mapping_options_pg" />
+    <create-user-mapping sql-case-id="create_user_mapping_if_not_exists_pg" />
 </sql-parser-test-cases>
diff --git a/test/it/parser/src/main/resources/case/ddl/drop-database.xml 
b/test/it/parser/src/main/resources/case/ddl/drop-database.xml
index 6aae242ea83..900e308092e 100644
--- a/test/it/parser/src/main/resources/case/ddl/drop-database.xml
+++ b/test/it/parser/src/main/resources/case/ddl/drop-database.xml
@@ -36,4 +36,9 @@
     <drop-database sql-case-id="drop_database_doris_force" force="true" />
     <drop-database sql-case-id="drop_database_doris_if_exists_force" 
force="true" />
     <drop-database sql-case-id="drop_database_doris_without_force" />
+    <drop-database sql-case-id="drop_database_force_pg" force="true" />
+    <drop-database sql-case-id="drop_database_with_force_pg" force="true" />
+    <drop-database sql-case-id="drop_database_if_exists_force_pg" force="true" 
/>
+    <drop-database sql-case-id="drop_database_if_exists_with_force_pg" 
force="true" />
+    <drop-database sql-case-id="drop_database_force_list_pg" force="true" />
 </sql-parser-test-cases>
diff --git a/test/it/parser/src/main/resources/case/ddl/create-server.xml 
b/test/it/parser/src/main/resources/case/ddl/drop-user-mapping.xml
similarity index 86%
copy from test/it/parser/src/main/resources/case/ddl/create-server.xml
copy to test/it/parser/src/main/resources/case/ddl/drop-user-mapping.xml
index 922a53d667e..695c5b933ca 100644
--- a/test/it/parser/src/main/resources/case/ddl/create-server.xml
+++ b/test/it/parser/src/main/resources/case/ddl/drop-user-mapping.xml
@@ -17,6 +17,6 @@
   -->
 
 <sql-parser-test-cases>
-<!--    <create-server sql-case-id="create_server" />-->
-    <create-server sql-case-id="create_server_doris_basic" />
+    <drop-user-mapping sql-case-id="drop_user_mapping_basic_pg" />
+    <drop-user-mapping sql-case-id="drop_user_mapping_if_exists_pg" />
 </sql-parser-test-cases>
diff --git a/test/it/parser/src/main/resources/case/dml/select.xml 
b/test/it/parser/src/main/resources/case/dml/select.xml
index c27acb878f2..ead992450b0 100644
--- a/test/it/parser/src/main/resources/case/dml/select.xml
+++ b/test/it/parser/src/main/resources/case/dml/select.xml
@@ -15523,6 +15523,16 @@
         </projections>
     </select>
 
+    <select sql-case-id="select_routine_keywords_identifier_pg">
+        <projections start-index="7" stop-index="20">
+            <column-projection name="atomic" start-index="7" stop-index="12" />
+            <column-projection name="return" start-index="15" stop-index="20" 
/>
+        </projections>
+        <from>
+            <simple-table name="atomic" start-index="27" stop-index="42" 
alias="return" />
+        </from>
+    </select>
+
     <select sql-case-id="select_cast_tsvector_name_pg">
         <projections start-index="7" stop-index="21">
             <expression-projection text="'foo'::tsvector" start-index="7" 
stop-index="21">
diff --git a/test/it/parser/src/main/resources/sql/supported/dal/reset.xml 
b/test/it/parser/src/main/resources/sql/supported/dal/reset.xml
index 16acfdf3b4b..dd25021a62e 100644
--- a/test/it/parser/src/main/resources/sql/supported/dal/reset.xml
+++ b/test/it/parser/src/main/resources/sql/supported/dal/reset.xml
@@ -31,4 +31,12 @@
     <sql-case id="reset_persist" value="RESET PERSIST" db-types="MySQL,Doris" 
/>
     <sql-case id="reset_persist_identifier" value="RESET PERSIST TEST_ID" 
db-types="MySQL,Doris" />
     <sql-case id="reset_persist_exist_identifier" value="RESET PERSIST IF 
EXISTS TEST_ID" db-types="MySQL,Doris" />
+    <sql-case id="reset_session_authorization_pg" value="RESET SESSION 
AUTHORIZATION" db-types="PostgreSQL" />
+    <sql-case id="reset_session_authorization_lowercase_pg" value="reset 
session authorization;" db-types="PostgreSQL" />
+    <sql-case id="reset_session_authorization_comments_pg" value="RESET /* foo 
*/ SESSION /* bar */ AUTHORIZATION" db-types="PostgreSQL" />
+    <sql-case id="reset_time_zone_pg" value="RESET TIME ZONE" 
db-types="PostgreSQL" />
+    <sql-case id="reset_dotted_pg" value="RESET custom.my_guc" 
db-types="PostgreSQL" />
+    <sql-case id="reset_quoted_dotted_pg" value="RESET 
&quot;foo&quot;.&quot;bar&quot;" db-types="PostgreSQL" />
+    <sql-case id="reset_session_parameter_pg" value="RESET session" 
db-types="PostgreSQL" />
+    <sql-case id="reset_time_parameter_pg" value="RESET time" 
db-types="PostgreSQL" />
 </sql-cases>
diff --git a/test/it/parser/src/main/resources/sql/supported/dcl/grant-user.xml 
b/test/it/parser/src/main/resources/sql/supported/dcl/grant-user.xml
index e1cc8bde073..1234b747b5e 100644
--- a/test/it/parser/src/main/resources/sql/supported/dcl/grant-user.xml
+++ b/test/it/parser/src/main/resources/sql/supported/dcl/grant-user.xml
@@ -189,4 +189,16 @@
     <sql-case id="grant_role_option_keyword_postgresql" value="GRANT 
foo_reader TO foo_user WITH INHERIT OPTION, SET FALSE" db-types="PostgreSQL" />
     <sql-case id="grant_global_spaced_wildcard" value="GRANT SELECT ON * . * 
TO u@localhost" db-types="MySQL,Doris" />
     <sql-case id="grant_database_spaced_wildcard" value="GRANT SELECT ON db . 
* TO u@localhost" db-types="MySQL,Doris" />
+
+    <sql-case id="grant_maintain_pg" value="GRANT MAINTAIN ON t TO r" 
db-types="PostgreSQL" />
+    <sql-case id="grant_maintain_multiple_pg" value="GRANT SELECT, MAINTAIN ON 
TABLE s.t TO r WITH GRANT OPTION" db-types="PostgreSQL" />
+    <sql-case id="grant_named_privilege_pg" value="GRANT custom_privilege ON t 
TO r" db-types="PostgreSQL" />
+    <sql-case id="grant_granted_by_pg" value="GRANT SELECT ON t TO r GRANTED 
BY CURRENT_USER" db-types="PostgreSQL" />
+    <sql-case id="grant_select_privilege_control_pg" value="GRANT SELECT ON t 
TO r" db-types="PostgreSQL" />
+    <sql-case id="grant_role_privilege_control_pg" value="GRANT r1 TO r2" 
db-types="PostgreSQL" />
+    <sql-case id="grant_role_admin_true_pg" value="GRANT r1 TO r2 WITH ADMIN 
TRUE" db-types="PostgreSQL" />
+    <sql-case id="grant_role_admin_false_pg" value="GRANT r1 TO r2 WITH ADMIN 
FALSE" db-types="PostgreSQL" />
+    <sql-case id="grant_role_inherit_set_pg" value="GRANT r1 TO r2 WITH 
INHERIT TRUE, SET FALSE" db-types="PostgreSQL" />
+    <sql-case id="grant_role_options_grantor_pg" value="GRANT r1 TO r2 WITH 
ADMIN OPTION, INHERIT FALSE, SET TRUE GRANTED BY CURRENT_USER" 
db-types="PostgreSQL" />
+    <sql-case id="grant_role_admin_option_control_pg" value="GRANT r1 TO r2 
WITH ADMIN OPTION" db-types="PostgreSQL" />
 </sql-cases>
diff --git 
a/test/it/parser/src/main/resources/sql/supported/dcl/revoke-user.xml 
b/test/it/parser/src/main/resources/sql/supported/dcl/revoke-user.xml
index 84eaf6a5d88..ce2e23f1a07 100644
--- a/test/it/parser/src/main/resources/sql/supported/dcl/revoke-user.xml
+++ b/test/it/parser/src/main/resources/sql/supported/dcl/revoke-user.xml
@@ -159,6 +159,12 @@
     <sql-case id="revoke_create_role_privilege_doris" value="REVOKE CREATE 
ROLE ON *.* FROM user1" db-types="Doris" />
     <sql-case id="revoke_drop_role_privilege_doris" value="REVOKE DROP ROLE ON 
*.* FROM user1" db-types="Doris" />
     <sql-case id="revoke_select_sql92" value="REVOKE SELECT (order_id) ON 
t_order FROM user1" db-types="SQL92" />
+    <sql-case id="revoke_maintain_pg" value="REVOKE MAINTAIN ON t FROM r" 
db-types="PostgreSQL" />
+    <sql-case id="revoke_granted_by_pg" value="REVOKE SELECT ON t FROM r 
GRANTED BY grantor" db-types="PostgreSQL" />
+    <sql-case id="revoke_role_inherit_pg" value="REVOKE INHERIT OPTION FOR r1 
FROM r2" db-types="PostgreSQL" />
+    <sql-case id="revoke_role_set_grantor_pg" value="REVOKE SET OPTION FOR r1 
FROM r2 GRANTED BY r3 CASCADE" db-types="PostgreSQL" />
+    <sql-case id="revoke_role_admin_option_control_pg" value="REVOKE ADMIN 
OPTION FOR r1 FROM r2" db-types="PostgreSQL" />
+    <sql-case id="revoke_object_grant_option_control_pg" value="REVOKE GRANT 
OPTION FOR SELECT ON t FROM r2" db-types="PostgreSQL" />
     <sql-case id="revoke_maintain_on_table_postgresql" value="REVOKE MAINTAIN 
ON foo_schema.foo FROM foo_role" db-types="PostgreSQL" />
     <sql-case id="revoke_privileges_granted_by_role_postgresql" value="REVOKE 
SELECT, UPDATE ON foo FROM foo_role GRANTED BY foo_owner CASCADE" 
db-types="PostgreSQL" />
     <sql-case id="revoke_grant_option_granted_by_postgresql" value="REVOKE 
GRANT OPTION FOR SELECT ON foo FROM foo_role GRANTED BY CURRENT_USER RESTRICT" 
db-types="PostgreSQL" />
diff --git 
a/test/it/parser/src/main/resources/sql/supported/ddl/alter-default-privileges.xml
 
b/test/it/parser/src/main/resources/sql/supported/ddl/alter-default-privileges.xml
index 26f3c304979..aa03417dce3 100644
--- 
a/test/it/parser/src/main/resources/sql/supported/ddl/alter-default-privileges.xml
+++ 
b/test/it/parser/src/main/resources/sql/supported/ddl/alter-default-privileges.xml
@@ -21,4 +21,6 @@
     <sql-case id="alter_default_privileges_revoke_delete" value="ALTER DEFAULT 
PRIVILEGES FOR ROLE regress_addr_user REVOKE DELETE ON TABLES FROM 
regress_addr_user;" db-types="PostgreSQL,openGauss" />
     <sql-case id="alter_default_privileges_grant_insert" value="ALTER DEFAULT 
PRIVILEGES FOR ROLE regress_matview_user GRANT INSERT ON TABLES TO 
regress_matview_user;" db-types="PostgreSQL,openGauss" />
     <sql-case id="alter_default_privileges_revoke_insert" value="ALTER DEFAULT 
PRIVILEGES FOR ROLE regress_matview_user REVOKE INSERT ON TABLES FROM 
regress_matview_user;" db-types="PostgreSQL,openGauss" />
+    <sql-case id="alter_default_usage_schemas_pg" value="ALTER DEFAULT 
PRIVILEGES GRANT USAGE ON SCHEMAS TO r" db-types="PostgreSQL" />
+    <sql-case id="alter_default_usage_types_pg" value="ALTER DEFAULT 
PRIVILEGES REVOKE USAGE ON TYPES FROM r" db-types="PostgreSQL" />
 </sql-cases>
diff --git 
a/test/it/parser/src/main/resources/sql/supported/ddl/create-server.xml 
b/test/it/parser/src/main/resources/sql/supported/ddl/alter-event-trigger.xml
similarity index 69%
copy from test/it/parser/src/main/resources/sql/supported/ddl/create-server.xml
copy to 
test/it/parser/src/main/resources/sql/supported/ddl/alter-event-trigger.xml
index f3c75455e00..728541b6e53 100644
--- a/test/it/parser/src/main/resources/sql/supported/ddl/create-server.xml
+++ 
b/test/it/parser/src/main/resources/sql/supported/ddl/alter-event-trigger.xml
@@ -17,5 +17,7 @@
   -->
 
 <sql-cases>
-    <sql-case id="create_server_doris_basic" value="CREATE SERVER s0 FOREIGN 
DATA WRAPPER mysql OPTIONS (USER 'doris_user', HOST '127.0.0.1')" 
db-types="Doris,MySQL" />
+    <sql-case id="alter_event_trigger_enable_pg" value="ALTER EVENT TRIGGER 
foo_trigger ENABLE ALWAYS" db-types="PostgreSQL" />
+    <sql-case id="alter_event_trigger_owner_pg" value="ALTER EVENT TRIGGER 
foo_trigger OWNER TO foo_user" db-types="PostgreSQL" />
+    <sql-case id="alter_event_trigger_default_enable_pg" value="ALTER EVENT 
TRIGGER foo_trigger ENABLE" db-types="PostgreSQL" />
 </sql-cases>
diff --git 
a/test/it/parser/src/main/resources/sql/supported/ddl/create-server.xml 
b/test/it/parser/src/main/resources/sql/supported/ddl/alter-large-object.xml
similarity index 83%
copy from test/it/parser/src/main/resources/sql/supported/ddl/create-server.xml
copy to 
test/it/parser/src/main/resources/sql/supported/ddl/alter-large-object.xml
index f3c75455e00..592a8aef0ea 100644
--- a/test/it/parser/src/main/resources/sql/supported/ddl/create-server.xml
+++ b/test/it/parser/src/main/resources/sql/supported/ddl/alter-large-object.xml
@@ -17,5 +17,5 @@
   -->
 
 <sql-cases>
-    <sql-case id="create_server_doris_basic" value="CREATE SERVER s0 FOREIGN 
DATA WRAPPER mysql OPTIONS (USER 'doris_user', HOST '127.0.0.1')" 
db-types="Doris,MySQL" />
+    <sql-case id="alter_large_object_owner_pg" value="ALTER LARGE OBJECT 123 
OWNER TO foo_user" db-types="PostgreSQL" />
 </sql-cases>
diff --git 
a/test/it/parser/src/main/resources/sql/supported/ddl/alter-operator.xml 
b/test/it/parser/src/main/resources/sql/supported/ddl/alter-operator.xml
index ccd6791d4c7..e610050dd83 100644
--- a/test/it/parser/src/main/resources/sql/supported/ddl/alter-operator.xml
+++ b/test/it/parser/src/main/resources/sql/supported/ddl/alter-operator.xml
@@ -23,4 +23,12 @@
     <sql-case id="alter_operator_set_restrict_join" value="ALTER OPERATOR === 
(boolean, boolean) SET (RESTRICT = customcontsel, JOIN = contjoinsel);" 
db-types="PostgreSQL" />
     <sql-case id="alter_operator_compile" value="ALTER OPERATOR eq_op 
COMPILE;" db-types="Oracle" />
     <sql-case id="alter_operator_add_binding_return_number_using" value="ALTER 
OPERATOR Contains ADD BINDING (music.artist, music.artist) RETURN NUMBER USING 
music.contains" db-types="Oracle" />
+    <sql-case id="alter_operator_class_owner_pg" value="ALTER OPERATOR CLASS 
foo_class USING btree OWNER TO foo_user" db-types="PostgreSQL" />
+    <sql-case id="alter_operator_class_rename_pg" value="ALTER OPERATOR CLASS 
foo_class USING btree RENAME TO bar_class" db-types="PostgreSQL" />
+    <sql-case id="alter_operator_class_schema_pg" value="ALTER OPERATOR CLASS 
foo_class USING btree SET SCHEMA foo_schema" db-types="PostgreSQL" />
+    <sql-case id="alter_operator_family_owner_pg" value="ALTER OPERATOR FAMILY 
foo_family USING hash OWNER TO foo_user" db-types="PostgreSQL" />
+    <sql-case id="alter_operator_family_rename_pg" value="ALTER OPERATOR 
FAMILY foo_family USING btree RENAME TO bar_family" db-types="PostgreSQL" />
+    <sql-case id="alter_operator_family_schema_pg" value="ALTER OPERATOR 
FAMILY foo_family USING btree SET SCHEMA foo_schema" db-types="PostgreSQL" />
+    <sql-case id="alter_operator_family_add_pg" value="ALTER OPERATOR FAMILY 
foo_family USING btree ADD OPERATOR 1 &lt; (integer, integer), FUNCTION 1 
btint4cmp(integer, integer)" db-types="PostgreSQL" />
+    <sql-case id="alter_operator_family_drop_pg" value="ALTER OPERATOR FAMILY 
foo_family USING btree DROP OPERATOR 1 (integer, integer), FUNCTION 1 (integer, 
integer)" db-types="PostgreSQL" />
 </sql-cases>
diff --git 
a/test/it/parser/src/main/resources/sql/supported/ddl/alter-publication.xml 
b/test/it/parser/src/main/resources/sql/supported/ddl/alter-publication.xml
index 5abf71c3fed..dfca8586286 100644
--- a/test/it/parser/src/main/resources/sql/supported/ddl/alter-publication.xml
+++ b/test/it/parser/src/main/resources/sql/supported/ddl/alter-publication.xml
@@ -23,4 +23,9 @@
     <sql-case id="alter_publication_add_table" value="ALTER PUBLICATION 
mypublication ADD TABLE stores, cities;" db-types="PostgreSQL" />
     <sql-case id="alter_publication_drop_table" value="ALTER PUBLICATION 
mypublication DROP TABLE users;" db-types="PostgreSQL" />
     <sql-case id="alter_publication_set_definition" value="ALTER PUBLICATION 
noinsert SET (publish = 'update, delete');" db-types="PostgreSQL" />
+    <sql-case id="alter_publication_add_schema_pg" value="ALTER PUBLICATION 
foo_pub ADD TABLES IN SCHEMA foo, bar" db-types="PostgreSQL" />
+    <sql-case id="alter_publication_set_filter_pg" value="ALTER PUBLICATION 
foo_pub SET TABLE ONLY foo_table (a) WHERE (a &gt; 0)" db-types="PostgreSQL" />
+    <sql-case id="alter_publication_drop_schema_pg" value="ALTER PUBLICATION 
foo_pub DROP TABLES IN SCHEMA CURRENT_SCHEMA" db-types="PostgreSQL" />
+    <sql-case id="alter_publication_all_sequences_pg" value="ALTER PUBLICATION 
foo_pub SET ALL TABLES, ALL SEQUENCES" db-types="PostgreSQL" />
+    <sql-case id="alter_publication_all_except_pg" value="ALTER PUBLICATION 
foo_pub SET ALL TABLES EXCEPT (TABLE foo_table)" db-types="PostgreSQL" />
 </sql-cases>
diff --git 
a/test/it/parser/src/main/resources/sql/supported/ddl/alter-system.xml 
b/test/it/parser/src/main/resources/sql/supported/ddl/alter-system.xml
index a8d5c873819..b03b55d7722 100644
--- a/test/it/parser/src/main/resources/sql/supported/ddl/alter-system.xml
+++ b/test/it/parser/src/main/resources/sql/supported/ddl/alter-system.xml
@@ -46,4 +46,6 @@
     <sql-case id="alter_system_set_parameter_recyclebin_scope" value="ALTER 
SYSTEM SET recyclebin = ON SCOPE = SPFILE" db-types="Oracle" />
     <sql-case id="alter_system_set_events1" value="ALTER SYSTEM SET EVENTS 
'CLIENTID_OVERWRITE'" db-types="Oracle" />
     <sql-case id="alter_system_set_events2" value="ALTER SYSTEM SET EVENTS 
'CLIENTID_OVERWRITE OFF'" db-types="Oracle" />
+    <sql-case id="alter_system_set_pg" value="ALTER SYSTEM SET custom.foo TO 
'bar'" db-types="PostgreSQL" />
+    <sql-case id="alter_system_reset_pg" value="ALTER SYSTEM RESET ALL" 
db-types="PostgreSQL" />
 </sql-cases>
diff --git 
a/test/it/parser/src/main/resources/sql/supported/ddl/alter-table.xml 
b/test/it/parser/src/main/resources/sql/supported/ddl/alter-table.xml
index eaf7ff16a16..26cb4e506fd 100644
--- a/test/it/parser/src/main/resources/sql/supported/ddl/alter-table.xml
+++ b/test/it/parser/src/main/resources/sql/supported/ddl/alter-table.xml
@@ -491,4 +491,11 @@
     <sql-case id="alter_table_execute_cherry_pick" value="ALTER table test 
EXECUTE CHERRY-PICK 8602659039622823857;" db-types="Hive" />
     <sql-case id="alter_execute_rollback_timestamp" value="ALTER TABLE ice_t 
EXECUTE ROLLBACK('2022-05-12 00:00:00')" db-types="Hive" />
     <sql-case id="alter_execute_rollback_snapshot_id" value="ALTER TABLE ice_t 
EXECUTE ROLLBACK(1111);" db-types="Hive" />
+    <sql-case id="alter_table_reset_option_pg" value="ALTER TABLE t RESET 
(fillfactor)" db-types="PostgreSQL" />
+    <sql-case id="alter_table_reset_options_namespace_pg" value="ALTER TABLE t 
RESET (autovacuum_enabled, toast.autovacuum_enabled)" db-types="PostgreSQL" />
+    <sql-case id="alter_table_column_reset_option_pg" value="ALTER TABLE t 
ALTER COLUMN c RESET (n_distinct)" db-types="PostgreSQL" />
+    <sql-case id="alter_table_column_reset_without_column_pg" value="ALTER 
TABLE t ALTER c RESET (n_distinct_inherited)" db-types="PostgreSQL" />
+    <sql-case id="alter_table_reset_set_control_pg" value="ALTER TABLE t SET 
(fillfactor = 70)" db-types="PostgreSQL" />
+    <sql-case id="alter_table_reset_value_control_pg" value="ALTER TABLE t 
RESET (fillfactor = 70)" db-types="PostgreSQL" />
+    <sql-case id="alter_table_column_reset_value_control_pg" value="ALTER 
TABLE t ALTER COLUMN c RESET (n_distinct = 0.1)" db-types="PostgreSQL" />
 </sql-cases>
diff --git 
a/test/it/parser/src/main/resources/sql/supported/ddl/create-server.xml 
b/test/it/parser/src/main/resources/sql/supported/ddl/alter-user-mapping.xml
similarity index 74%
copy from test/it/parser/src/main/resources/sql/supported/ddl/create-server.xml
copy to 
test/it/parser/src/main/resources/sql/supported/ddl/alter-user-mapping.xml
index f3c75455e00..5b93407a489 100644
--- a/test/it/parser/src/main/resources/sql/supported/ddl/create-server.xml
+++ b/test/it/parser/src/main/resources/sql/supported/ddl/alter-user-mapping.xml
@@ -17,5 +17,6 @@
   -->
 
 <sql-cases>
-    <sql-case id="create_server_doris_basic" value="CREATE SERVER s0 FOREIGN 
DATA WRAPPER mysql OPTIONS (USER 'doris_user', HOST '127.0.0.1')" 
db-types="Doris,MySQL" />
+    <sql-case id="alter_user_mapping_set_pg" value="ALTER USER MAPPING FOR 
CURRENT_USER SERVER foo_server OPTIONS (SET user 'foo')" db-types="PostgreSQL" 
/>
+    <sql-case id="alter_user_mapping_drop_pg" value="ALTER USER MAPPING FOR 
PUBLIC SERVER foo_server OPTIONS (DROP user)" db-types="PostgreSQL" />
 </sql-cases>
diff --git 
a/test/it/parser/src/main/resources/sql/supported/ddl/create-function.xml 
b/test/it/parser/src/main/resources/sql/supported/ddl/create-function.xml
index 0242aa297af..44ebf92041f 100644
--- a/test/it/parser/src/main/resources/sql/supported/ddl/create-function.xml
+++ b/test/it/parser/src/main/resources/sql/supported/ddl/create-function.xml
@@ -146,4 +146,13 @@
     <sql-case id="create_function_if_not_exists_mysql" value="CREATE FUNCTION 
IF NOT EXISTS f() RETURNS INT RETURN 1" db-types="MySQL,Doris" />
 
 
+    <sql-case id="create_function_return_expression_pg" value="CREATE FUNCTION 
f(a int) RETURNS int RETURN a + 1" db-types="PostgreSQL" />
+    <sql-case id="create_function_return_subquery_pg" value="CREATE FUNCTION 
f() RETURNS bigint LANGUAGE sql RETURN (SELECT count(*) FROM t)" 
db-types="PostgreSQL" />
+    <sql-case id="create_function_atomic_empty_pg" value="CREATE FUNCTION f() 
RETURNS void BEGIN ATOMIC END" db-types="PostgreSQL" />
+    <sql-case id="create_function_atomic_return_pg" value="CREATE FUNCTION f() 
RETURNS boolean BEGIN ATOMIC ;;RETURN false;; END" db-types="PostgreSQL" />
+    <sql-case id="create_function_atomic_select_pg" value="CREATE FUNCTION f(a 
int) RETURNS int LANGUAGE sql BEGIN ATOMIC SELECT CASE WHEN a &gt; 0 THEN a 
ELSE 0 END; END" db-types="PostgreSQL" />
+    <sql-case id="create_function_atomic_dml_pg" value="CREATE FUNCTION f() 
RETURNS void BEGIN ATOMIC INSERT INTO t VALUES (1); UPDATE t SET a = a + 1; 
DELETE FROM t WHERE a = 2; END" db-types="PostgreSQL" />
+    <sql-case id="create_function_atomic_merge_pg" value="CREATE FUNCTION f() 
RETURNS void BEGIN ATOMIC MERGE INTO t USING s ON t.id = s.id WHEN MATCHED THEN 
DELETE; END" db-types="PostgreSQL" />
+    <sql-case id="create_function_atomic_table_pg" value="CREATE FUNCTION f() 
RETURNS TABLE (a int) BEGIN ATOMIC SELECT 1; END" db-types="PostgreSQL" />
+    <sql-case id="create_function_body_string_control_pg" value="CREATE 
FUNCTION f() RETURNS int LANGUAGE sql AS 'SELECT 1'" db-types="PostgreSQL" />
 </sql-cases>
diff --git 
a/test/it/parser/src/main/resources/sql/supported/ddl/create-index.xml 
b/test/it/parser/src/main/resources/sql/supported/ddl/create-index.xml
index 8d95d2646b9..b2c16dedfe1 100644
--- a/test/it/parser/src/main/resources/sql/supported/ddl/create-index.xml
+++ b/test/it/parser/src/main/resources/sql/supported/ddl/create-index.xml
@@ -101,4 +101,12 @@
     <sql-case id="create_index_doris_full_syntax" value="CREATE INDEX IF NOT 
EXISTS index1 ON table1 (column1) USING INVERTED PROPERTIES ('parser' = 
'standard') COMMENT 'full syntax'" db-types="Doris" />
     <sql-case id="create_index_with_domain_index_type" value="CREATE INDEX 
doc_idx on docs(document) indextype is ctxsys.context FILTER BY category, 
author ORDER BY pub_date desc, docid PARAMETERS ('memory 500M')" 
db-types="Oracle" />
     <sql-case id="create_index_with_indextype_and_parameters" value="CREATE 
INDEX Test_indx ON Test_tab(col_a) INDEXTYPE IS indtype PARAMETERS('example')" 
db-types="Oracle" />
+    <sql-case id="create_index_empty_function_pg" value="CREATE INDEX foo_idx 
ON foo_table (foo())" db-types="PostgreSQL" case-types="Literal" />
+    <sql-case id="create_index_common_function_pg" value="CREATE INDEX foo_idx 
ON foo_table (coalesce(a, 0), lower(b))" db-types="PostgreSQL" 
case-types="Literal" />
+    <sql-case id="create_index_cast_expression_pg" value="CREATE INDEX foo_idx 
ON foo_table (CAST(a AS integer))" db-types="PostgreSQL" case-types="Literal" />
+    <sql-case id="create_index_nested_cast_pg" value="CREATE INDEX foo_idx ON 
foo_table (CAST(CAST(a AS integer) AS bigint))" db-types="PostgreSQL" 
case-types="Literal" />
+    <sql-case id="create_index_function_cast_pg" value="CREATE INDEX foo_idx 
ON foo_table (coalesce(CAST(a AS integer), 0))" db-types="PostgreSQL" 
case-types="Literal" />
+    <sql-case id="create_index_cast_binary_pg" value="CREATE INDEX foo_idx ON 
foo_table (CAST(a + CAST(b AS integer) AS integer))" db-types="PostgreSQL" 
case-types="Literal" />
+    <sql-case id="create_index_nested_function_cast_pg" value="CREATE INDEX 
foo_idx ON foo_table (coalesce(abs(CAST(b AS integer)), CAST(a AS integer), 
b))" db-types="PostgreSQL" case-types="Literal" />
+    <sql-case id="create_index_array_subscript_function_pg" value="CREATE 
INDEX foo_idx ON foo_table (abs(a[1]))" db-types="PostgreSQL" 
case-types="Literal" />
 </sql-cases>
diff --git 
a/test/it/parser/src/main/resources/sql/supported/ddl/create-operator.xml 
b/test/it/parser/src/main/resources/sql/supported/ddl/create-operator.xml
index c29f76f0bbb..eb61c0709e2 100644
--- a/test/it/parser/src/main/resources/sql/supported/ddl/create-operator.xml
+++ b/test/it/parser/src/main/resources/sql/supported/ddl/create-operator.xml
@@ -25,4 +25,8 @@
     <sql-case id="create_operator_with_binding_custom_datatype" value="CREATE 
OPERATOR Contains BINDING (VARCHAR2, VARCHAR2) RETURN NUMBER USING 
text.contains, (Spatial.Geo, Spatial.Geo) RETURN NUMBER USING 
Spatial.contains;" db-types="Oracle" />
     <sql-case id="create_operator_with_compute_ancillary_data" value="CREATE 
OPERATOR Contains BINDING (VARCHAR2, VARCHAR2) RETURN NUMBER WITH INDEX 
CONTEXT, SCAN CONTEXT TextIndexMethods COMPUTE ANCILLARY DATA USING 
TextContains;" db-types="Oracle" />
     <sql-case id="create_operator_with_single_binding" value="CREATE OPERATOR 
userOp BINDING (NUMBER) RETURN NUMBER USING userOp_func;" db-types="Oracle" />
+    <sql-case id="create_operator_class_basic_pg" value="CREATE OPERATOR CLASS 
foo_class FOR TYPE integer USING btree AS OPERATOR 1 &lt; (integer, integer), 
FUNCTION 1 btint4cmp(integer, integer)" db-types="PostgreSQL" />
+    <sql-case id="create_operator_class_default_pg" value="CREATE OPERATOR 
CLASS foo.foo_class DEFAULT FOR TYPE integer USING btree FAMILY foo.foo_family 
AS FUNCTION 1 btint4cmp(integer, integer)" db-types="PostgreSQL" />
+    <sql-case id="create_operator_family_basic_pg" value="CREATE OPERATOR 
FAMILY foo_family USING btree" db-types="PostgreSQL" />
+    <sql-case id="create_operator_family_schema_pg" value="CREATE OPERATOR 
FAMILY foo.foo_family USING hash" db-types="PostgreSQL" />
 </sql-cases>
diff --git 
a/test/it/parser/src/main/resources/sql/supported/ddl/create-procedure.xml 
b/test/it/parser/src/main/resources/sql/supported/ddl/create-procedure.xml
index 60524eb9897..9d2e29f9380 100644
--- a/test/it/parser/src/main/resources/sql/supported/ddl/create-procedure.xml
+++ b/test/it/parser/src/main/resources/sql/supported/ddl/create-procedure.xml
@@ -129,5 +129,8 @@
     <sql-case id="create_procedure_with_cursor_fetch_and_package_call" 
value="CREATE OR REPLACE PROCEDURE CRM_CONTACTINFOR is v_count number; v_SEQ 
VARCHAR2(200); v_mobileno VARCHAR2(20); v_CUSTID VARCHAR2(200); cursor 
c_contactinfor is select con.SEQ_CONTACT_INFO, con.mobileno, sub.userid from 
subscriber sub, t_cm_contact_info con, customer cus where sub.servnumber = 
con.mobileno and cus.custid = con.custid; BEGIN OPEN c_contactinfor; LOOP FETCH 
c_contactinfor INTO v_SEQ, v_mobileno, v_ [...]
     <sql-case id="create_procedure_flush_kill" value="CREATE PROCEDURE p() 
BEGIN FLUSH STATUS; KILL @connection_id; END" db-types="MySQL,Doris" />
 
+    <sql-case id="create_procedure_atomic_empty_pg" value="CREATE PROCEDURE 
p() BEGIN ATOMIC END" db-types="PostgreSQL" />
+    <sql-case id="create_procedure_atomic_dml_pg" value="CREATE OR REPLACE 
PROCEDURE p() LANGUAGE sql BEGIN ATOMIC INSERT INTO t VALUES (1); END" 
db-types="PostgreSQL" />
+    <sql-case id="create_procedure_body_string_control_pg" value="CREATE 
PROCEDURE p() LANGUAGE sql AS 'INSERT INTO t VALUES (1)'" db-types="PostgreSQL" 
/>
     <sql-case id="create_plsql_block_with_schema_qualified_type_attribute" 
value="DECLARE foo_value foo_schema.foo_table.foo_id%TYPE; BEGIN NULL; END;" 
db-types="Oracle" />
 </sql-cases>
diff --git 
a/test/it/parser/src/main/resources/sql/supported/ddl/create-publication.xml 
b/test/it/parser/src/main/resources/sql/supported/ddl/create-publication.xml
index 5067aca2c43..56d771c1a89 100644
--- a/test/it/parser/src/main/resources/sql/supported/ddl/create-publication.xml
+++ b/test/it/parser/src/main/resources/sql/supported/ddl/create-publication.xml
@@ -20,4 +20,7 @@
     <sql-case id="create_publication" value="CREATE PUBLICATION mypublication 
FOR TABLE users, departments;" db-types="openGauss, PostgreSQL" />
     <sql-case id="create_publication_for_all_tables" value="CREATE PUBLICATION 
alltables FOR ALL TABLES;" db-types="openGauss, PostgreSQL" />
     <sql-case id="create_publication_with_statement" value="CREATE PUBLICATION 
insert_only FOR TABLE mydata WITH (publish = 'insert');" db-types="openGauss, 
PostgreSQL" />
+    <sql-case id="create_publication_row_filter_pg" value="CREATE PUBLICATION 
foo_pub FOR TABLE foo_table (a, b) WHERE (a &gt; 1), bar_table WHERE (b IS NOT 
NULL) WITH (publish = 'insert')" db-types="PostgreSQL" />
+    <sql-case id="create_publication_schema_pg" value="CREATE PUBLICATION 
foo_pub FOR TABLES IN SCHEMA foo, CURRENT_SCHEMA, TABLE bar.foo_table" 
db-types="PostgreSQL" />
+    <sql-case id="create_publication_all_except_pg" value="CREATE PUBLICATION 
foo_pub FOR ALL TABLES EXCEPT (TABLE foo_table, TABLE ONLY bar_table), ALL 
SEQUENCES" db-types="PostgreSQL" />
 </sql-cases>
diff --git 
a/test/it/parser/src/main/resources/sql/supported/ddl/create-server.xml 
b/test/it/parser/src/main/resources/sql/supported/ddl/create-server.xml
index f3c75455e00..011208f1875 100644
--- a/test/it/parser/src/main/resources/sql/supported/ddl/create-server.xml
+++ b/test/it/parser/src/main/resources/sql/supported/ddl/create-server.xml
@@ -18,4 +18,7 @@
 
 <sql-cases>
     <sql-case id="create_server_doris_basic" value="CREATE SERVER s0 FOREIGN 
DATA WRAPPER mysql OPTIONS (USER 'doris_user', HOST '127.0.0.1')" 
db-types="Doris,MySQL" />
+    <sql-case id="create_server_basic_pg" value="CREATE SERVER foo_server 
FOREIGN DATA WRAPPER foo_wrapper" db-types="PostgreSQL" />
+    <sql-case id="create_server_options_pg" value="CREATE SERVER foo_server 
FOREIGN DATA WRAPPER foo_wrapper OPTIONS (host 'foo')" db-types="PostgreSQL" />
+    <sql-case id="create_server_version_pg" value="CREATE SERVER IF NOT EXISTS 
foo_server TYPE 'foo_type' VERSION '1' FOREIGN DATA WRAPPER foo_wrapper" 
db-types="PostgreSQL" />
 </sql-cases>
diff --git 
a/test/it/parser/src/main/resources/sql/supported/ddl/create-publication.xml 
b/test/it/parser/src/main/resources/sql/supported/ddl/create-statistics.xml
similarity index 59%
copy from 
test/it/parser/src/main/resources/sql/supported/ddl/create-publication.xml
copy to 
test/it/parser/src/main/resources/sql/supported/ddl/create-statistics.xml
index 5067aca2c43..4acdfc422a3 100644
--- a/test/it/parser/src/main/resources/sql/supported/ddl/create-publication.xml
+++ b/test/it/parser/src/main/resources/sql/supported/ddl/create-statistics.xml
@@ -17,7 +17,8 @@
   -->
 
 <sql-cases>
-    <sql-case id="create_publication" value="CREATE PUBLICATION mypublication 
FOR TABLE users, departments;" db-types="openGauss, PostgreSQL" />
-    <sql-case id="create_publication_for_all_tables" value="CREATE PUBLICATION 
alltables FOR ALL TABLES;" db-types="openGauss, PostgreSQL" />
-    <sql-case id="create_publication_with_statement" value="CREATE PUBLICATION 
insert_only FOR TABLE mydata WITH (publish = 'insert');" db-types="openGauss, 
PostgreSQL" />
+    <sql-case id="create_statistics_named_pg" value="CREATE STATISTICS 
foo_stats ON a, b FROM foo_table" db-types="PostgreSQL" />
+    <sql-case id="create_statistics_if_not_exists_pg" value="CREATE STATISTICS 
IF NOT EXISTS foo.foo_stats (ndistinct, dependencies, mcv) ON a, b FROM 
foo.foo_table" db-types="PostgreSQL" />
+    <sql-case id="create_statistics_anonymous_pg" value="CREATE STATISTICS ON 
a, b FROM foo_table" db-types="PostgreSQL" />
+    <sql-case id="create_statistics_expression_pg" value="CREATE STATISTICS 
(mcv) ON a, (a + b), lower(c) FROM foo_table" db-types="PostgreSQL" />
 </sql-cases>
diff --git 
a/test/it/parser/src/main/resources/sql/supported/ddl/create-subscription.xml 
b/test/it/parser/src/main/resources/sql/supported/ddl/create-subscription.xml
new file mode 100644
index 00000000000..523334faa0b
--- /dev/null
+++ 
b/test/it/parser/src/main/resources/sql/supported/ddl/create-subscription.xml
@@ -0,0 +1,25 @@
+<?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_subscription_connection_pg" value="CREATE 
SUBSCRIPTION foo_sub CONNECTION '' PUBLICATION foo_pub" db-types="PostgreSQL" />
+    <sql-case id="create_subscription_options_pg" value="CREATE SUBSCRIPTION 
foo_sub CONNECTION '' PUBLICATION foo_pub, bar_pub WITH (connect = false, 
slot_name = NONE)" db-types="PostgreSQL" />
+    <sql-case id="create_subscription_server_pg" value="CREATE SUBSCRIPTION 
foo_sub SERVER foo_server PUBLICATION foo_pub WITH (connect = false)" 
db-types="PostgreSQL" />
+    <sql-case id="create_subscription_negative_option_pg" value="CREATE 
SUBSCRIPTION foo_sub CONNECTION '' PUBLICATION foo_pub WITH (connect = false, 
max_retention_duration = -1)" db-types="PostgreSQL" />
+    <sql-case id="create_subscription_positive_sign_pg" value="CREATE 
SUBSCRIPTION foo_sub CONNECTION '' PUBLICATION foo_pub WITH (connect = false, 
max_retention_duration = +1)" db-types="PostgreSQL" />
+</sql-cases>
diff --git 
a/test/it/parser/src/main/resources/sql/supported/ddl/create-server.xml 
b/test/it/parser/src/main/resources/sql/supported/ddl/create-transform.xml
similarity index 70%
copy from test/it/parser/src/main/resources/sql/supported/ddl/create-server.xml
copy to test/it/parser/src/main/resources/sql/supported/ddl/create-transform.xml
index f3c75455e00..d274ace59d3 100644
--- a/test/it/parser/src/main/resources/sql/supported/ddl/create-server.xml
+++ b/test/it/parser/src/main/resources/sql/supported/ddl/create-transform.xml
@@ -17,5 +17,6 @@
   -->
 
 <sql-cases>
-    <sql-case id="create_server_doris_basic" value="CREATE SERVER s0 FOREIGN 
DATA WRAPPER mysql OPTIONS (USER 'doris_user', HOST '127.0.0.1')" 
db-types="Doris,MySQL" />
+    <sql-case id="create_transform_both_pg" value="CREATE TRANSFORM FOR 
integer LANGUAGE sql (FROM SQL WITH FUNCTION foo(internal), TO SQL WITH 
FUNCTION bar(internal))" db-types="PostgreSQL" />
+    <sql-case id="create_transform_replace_pg" value="CREATE OR REPLACE 
TRANSFORM FOR integer LANGUAGE sql (TO SQL WITH FUNCTION bar(internal))" 
db-types="PostgreSQL" />
 </sql-cases>
diff --git 
a/test/it/parser/src/main/resources/sql/supported/ddl/create-server.xml 
b/test/it/parser/src/main/resources/sql/supported/ddl/create-user-mapping.xml
similarity index 66%
copy from test/it/parser/src/main/resources/sql/supported/ddl/create-server.xml
copy to 
test/it/parser/src/main/resources/sql/supported/ddl/create-user-mapping.xml
index f3c75455e00..f28645c2924 100644
--- a/test/it/parser/src/main/resources/sql/supported/ddl/create-server.xml
+++ 
b/test/it/parser/src/main/resources/sql/supported/ddl/create-user-mapping.xml
@@ -17,5 +17,7 @@
   -->
 
 <sql-cases>
-    <sql-case id="create_server_doris_basic" value="CREATE SERVER s0 FOREIGN 
DATA WRAPPER mysql OPTIONS (USER 'doris_user', HOST '127.0.0.1')" 
db-types="Doris,MySQL" />
+    <sql-case id="create_user_mapping_basic_pg" value="CREATE USER MAPPING FOR 
CURRENT_USER SERVER foo_server" db-types="PostgreSQL" />
+    <sql-case id="create_user_mapping_options_pg" value="CREATE USER MAPPING 
FOR PUBLIC SERVER foo_server OPTIONS (user 'foo')" db-types="PostgreSQL" />
+    <sql-case id="create_user_mapping_if_not_exists_pg" value="CREATE USER 
MAPPING IF NOT EXISTS FOR USER SERVER foo_server" db-types="PostgreSQL" />
 </sql-cases>
diff --git 
a/test/it/parser/src/main/resources/sql/supported/ddl/drop-database.xml 
b/test/it/parser/src/main/resources/sql/supported/ddl/drop-database.xml
index 35437256701..45a7acb466a 100644
--- a/test/it/parser/src/main/resources/sql/supported/ddl/drop-database.xml
+++ b/test/it/parser/src/main/resources/sql/supported/ddl/drop-database.xml
@@ -36,4 +36,9 @@
     <sql-case id="drop_database_doris_force" value="DROP DATABASE db_test 
FORCE" db-types="Doris" />
     <sql-case id="drop_database_doris_if_exists_force" value="DROP DATABASE IF 
EXISTS db_test FORCE" db-types="Doris" />
     <sql-case id="drop_database_doris_without_force" value="DROP DATABASE 
db_test" db-types="Doris" />
+    <sql-case id="drop_database_force_pg" value="DROP DATABASE database1 
(FORCE)" db-types="PostgreSQL" />
+    <sql-case id="drop_database_with_force_pg" value="DROP DATABASE database1 
WITH (FORCE)" db-types="PostgreSQL" />
+    <sql-case id="drop_database_if_exists_force_pg" value="DROP DATABASE IF 
EXISTS &quot;Database1&quot; (FORCE)" db-types="PostgreSQL" />
+    <sql-case id="drop_database_if_exists_with_force_pg" value="DROP DATABASE 
IF EXISTS database1 WITH (FORCE)" db-types="PostgreSQL" />
+    <sql-case id="drop_database_force_list_pg" value="DROP DATABASE database1 
(FORCE, FORCE)" db-types="PostgreSQL" />
 </sql-cases>
diff --git 
a/test/it/parser/src/main/resources/sql/supported/ddl/create-server.xml 
b/test/it/parser/src/main/resources/sql/supported/ddl/drop-user-mapping.xml
similarity index 76%
copy from test/it/parser/src/main/resources/sql/supported/ddl/create-server.xml
copy to 
test/it/parser/src/main/resources/sql/supported/ddl/drop-user-mapping.xml
index f3c75455e00..207d9080e32 100644
--- a/test/it/parser/src/main/resources/sql/supported/ddl/create-server.xml
+++ b/test/it/parser/src/main/resources/sql/supported/ddl/drop-user-mapping.xml
@@ -17,5 +17,6 @@
   -->
 
 <sql-cases>
-    <sql-case id="create_server_doris_basic" value="CREATE SERVER s0 FOREIGN 
DATA WRAPPER mysql OPTIONS (USER 'doris_user', HOST '127.0.0.1')" 
db-types="Doris,MySQL" />
+    <sql-case id="drop_user_mapping_basic_pg" value="DROP USER MAPPING FOR 
PUBLIC SERVER foo_server" db-types="PostgreSQL" />
+    <sql-case id="drop_user_mapping_if_exists_pg" value="DROP USER MAPPING IF 
EXISTS FOR CURRENT_USER SERVER foo_server" db-types="PostgreSQL" />
 </sql-cases>
diff --git a/test/it/parser/src/main/resources/sql/supported/dml/select.xml 
b/test/it/parser/src/main/resources/sql/supported/dml/select.xml
index fc3bafd6f2a..cbb392535e0 100644
--- a/test/it/parser/src/main/resources/sql/supported/dml/select.xml
+++ b/test/it/parser/src/main/resources/sql/supported/dml/select.xml
@@ -588,6 +588,7 @@
     <sql-case id="select_in_with_owner_column_rhs_oracle" value="SELECT * FROM 
t_order o WHERE o.user_id IN o.order_id" db-types="Oracle" />
     <sql-case id="select_in_with_function_rhs_oracle" value="SELECT * FROM 
t_order o WHERE o.user_id IN NVL(o.order_id, 0)" db-types="Oracle" />
     <sql-case id="select_parenthesized_column_alias" value="SELECT 
(c.password) PASSWORD FROM t_account c" 
db-types="Oracle,PostgreSQL,openGauss,SQLServer,Hive" />
+    <sql-case id="select_routine_keywords_identifier_pg" value="SELECT atomic, 
return FROM atomic AS return" db-types="PostgreSQL" />
     <sql-case id="select_cast_tsvector_name_pg" value="SELECT 'foo'::tsvector" 
db-types="PostgreSQL" />
     <sql-case id="select_cast_tsquery_name_pg" value="SELECT 'foo'::tsquery" 
db-types="PostgreSQL" />
     <sql-case id="select_cast_varbit_name_pg" value="SELECT '0101'::varbit" 
db-types="PostgreSQL" />

Reply via email to