apache/shardingsphere · error · UnsupportedSQLOperationException
Unsupported SQL operation: %s.
Error message
Unsupported SQL operation: %s.
What it means
Error "Unsupported SQL operation: %s." thrown in apache/shardingsphere.
Source
Thrown at proxy/frontend/dialect/postgresql/src/main/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/query/extended/close/PostgreSQLComCloseExecutor.java:55
public final class PostgreSQLComCloseExecutor implements CommandExecutor {
private final PortalContext portalContext;
private final PostgreSQLComClosePacket packet;
private final ConnectionSession connectionSession;
@Override
public Collection<DatabasePacket> execute() throws SQLException {
switch (packet.getType()) {
case PREPARED_STATEMENT:
connectionSession.getServerPreparedStatementRegistry().removePreparedStatement(packet.getName());
break;
case PORTAL:
portalContext.close(packet.getName());
break;
default:
throw new UnsupportedSQLOperationException(packet.getType().name());
}
return Collections.singleton(new PostgreSQLCloseCompletePacket());
}
}
View on GitHub (pinned to e952770a21)
Solutions
- Use Close only with prepared statements ('S') or portals ('P').
- Do not send Close for other object types.
- Verify the client library generates valid Close messages.
When it happens
Trigger: PostgreSQLComCloseExecutor receives a Close message with an unsupported type indicator.
Common situations: Malformed extended-protocol Close packets from buggy clients or proxies.
AI-assisted analysis of apache/shardingsphere@e952770a21 (2026-08-14).
Data as JSON: /api/errors/7547dcaa4f6f4b68.
Report an issue: GitHub.