apache/shardingsphere · error · UnsupportedSQLOperationException
Unsupported SQL operation: Unsupported describe type: %s.
Error message
Unsupported SQL operation: Unsupported describe type: %s.
What it means
Error "Unsupported SQL operation: Unsupported describe type: %s." thrown in apache/shardingsphere.
Source
Thrown at proxy/frontend/dialect/postgresql/src/main/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/query/extended/describe/PostgreSQLComDescribeExecutor.java:95
private static final String ANONYMOUS_COLUMN_NAME = "?column?";
private final PortalContext portalContext;
private final PostgreSQLComDescribePacket packet;
private final ConnectionSession connectionSession;
private final ColumnTypeOIDResolver columnTypeOIDResolver;
@Override
public Collection<DatabasePacket> execute() throws SQLException {
switch (packet.getType()) {
case 'S':
return describePreparedStatement();
case 'P':
return Collections.singleton(portalContext.get(packet.getName()).describe());
default:
throw new UnsupportedSQLOperationException("Unsupported describe type: " + packet.getType());
}
}
private List<DatabasePacket> describePreparedStatement() throws SQLException {
List<DatabasePacket> result = new ArrayList<>(2);
PostgreSQLServerPreparedStatement preparedStatement = connectionSession.getServerPreparedStatementRegistry().getPreparedStatement(packet.getName());
if (preparedStatement.getParameterTypes().stream().anyMatch(each -> PostgreSQLBinaryColumnType.UNSPECIFIED == each) || !preparedStatement.describeRows().isPresent()) {
tryDescribePreparedStatement(preparedStatement);
}
result.add(preparedStatement.describeParameters());
preparedStatement.describeRows().ifPresent(result::add);
return result;
}
private void tryDescribePreparedStatement(final PostgreSQLServerPreparedStatement preparedStatement) throws SQLException {
if (preparedStatement.getSqlStatementContext().getSqlStatement() instanceof InsertStatement) {
describeInsertStatementByDatabaseMetaData(preparedStatement);
} else {View on GitHub (pinned to e952770a21)
Solutions
- Describe only prepared statements ('S') or portals ('P').
- Check the type byte of the Describe message the client sends.
- Update the client driver if it emits an invalid Describe type.
When it happens
Trigger: PostgreSQLComDescribeExecutor receives a Describe message with an unsupported type indicator.
Common situations: Malformed extended-protocol Describe packets from buggy clients or middleboxes.
AI-assisted analysis of apache/shardingsphere@e952770a21 (2026-08-14).
Data as JSON: /api/errors/d7bf43fe869c5989.
Report an issue: GitHub.