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

zhangliang 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 428f4535a3a Remove unreachable codes on PostgreSQLErrorPacketFactory 
(#37917)
428f4535a3a is described below

commit 428f4535a3a8b600b78dc0255faf6d2398d32b64
Author: Liang Zhang <[email protected]>
AuthorDate: Sun Feb 1 00:05:59 2026 +0800

    Remove unreachable codes on PostgreSQLErrorPacketFactory (#37917)
---
 .../proxy/frontend/postgresql/err/PostgreSQLErrorPacketFactory.java    | 3 ---
 1 file changed, 3 deletions(-)

diff --git 
a/proxy/frontend/dialect/postgresql/src/main/java/org/apache/shardingsphere/proxy/frontend/postgresql/err/PostgreSQLErrorPacketFactory.java
 
b/proxy/frontend/dialect/postgresql/src/main/java/org/apache/shardingsphere/proxy/frontend/postgresql/err/PostgreSQLErrorPacketFactory.java
index 52b040fc3c7..be4e969a54b 100644
--- 
a/proxy/frontend/dialect/postgresql/src/main/java/org/apache/shardingsphere/proxy/frontend/postgresql/err/PostgreSQLErrorPacketFactory.java
+++ 
b/proxy/frontend/dialect/postgresql/src/main/java/org/apache/shardingsphere/proxy/frontend/postgresql/err/PostgreSQLErrorPacketFactory.java
@@ -70,9 +70,6 @@ public final class PostgreSQLErrorPacketFactory {
         if (cause instanceof PostgreSQLException && null != 
((PostgreSQLException) cause).getServerErrorMessage()) {
             return createErrorResponsePacket(((PostgreSQLException) 
cause).getServerErrorMessage());
         }
-        if (cause instanceof PSQLException && null != ((PSQLException) 
cause).getServerErrorMessage()) {
-            return createErrorResponsePacket(((PSQLException) 
cause).getServerErrorMessage());
-        }
         String sqlState = Strings.isNullOrEmpty(cause.getSQLState()) || 
XOpenSQLState.GENERAL_ERROR.getValue().equals(cause.getSQLState())
                 ? PostgreSQLVendorError.SYSTEM_ERROR.getSqlState().getValue()
                 : cause.getSQLState();

Reply via email to