{"record":{"id":"d7bf43fe869c5989","repo":"apache/shardingsphere","slug":"unsupported-sql-operation-unsupported-describe-ty","errorCode":null,"errorMessage":"Unsupported SQL operation: Unsupported describe type: %s.","messagePattern":"Unsupported SQL operation: Unsupported describe type: (.+?)\\.","errorType":"exception","errorClass":"UnsupportedSQLOperationException","httpStatus":null,"severity":"error","filePath":"proxy/frontend/dialect/postgresql/src/main/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/query/extended/describe/PostgreSQLComDescribeExecutor.java","lineNumber":95,"sourceCode":"    private static final String ANONYMOUS_COLUMN_NAME = \"?column?\";\n    \n    private final PortalContext portalContext;\n    \n    private final PostgreSQLComDescribePacket packet;\n    \n    private final ConnectionSession connectionSession;\n    \n    private final ColumnTypeOIDResolver columnTypeOIDResolver;\n    \n    @Override\n    public Collection<DatabasePacket> execute() throws SQLException {\n        switch (packet.getType()) {\n            case 'S':\n                return describePreparedStatement();\n            case 'P':\n                return Collections.singleton(portalContext.get(packet.getName()).describe());\n            default:\n                throw new UnsupportedSQLOperationException(\"Unsupported describe type: \" + packet.getType());\n        }\n    }\n    \n    private List<DatabasePacket> describePreparedStatement() throws SQLException {\n        List<DatabasePacket> result = new ArrayList<>(2);\n        PostgreSQLServerPreparedStatement preparedStatement = connectionSession.getServerPreparedStatementRegistry().getPreparedStatement(packet.getName());\n        if (preparedStatement.getParameterTypes().stream().anyMatch(each -> PostgreSQLBinaryColumnType.UNSPECIFIED == each) || !preparedStatement.describeRows().isPresent()) {\n            tryDescribePreparedStatement(preparedStatement);\n        }\n        result.add(preparedStatement.describeParameters());\n        preparedStatement.describeRows().ifPresent(result::add);\n        return result;\n    }\n    \n    private void tryDescribePreparedStatement(final PostgreSQLServerPreparedStatement preparedStatement) throws SQLException {\n        if (preparedStatement.getSqlStatementContext().getSqlStatement() instanceof InsertStatement) {\n            describeInsertStatementByDatabaseMetaData(preparedStatement);\n        } else {","sourceCodeStart":77,"sourceCodeEnd":113,"githubUrl":"https://github.com/apache/shardingsphere/blob/e952770a215630a3659c75d64369168cd3e26b82/proxy/frontend/dialect/postgresql/src/main/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/query/extended/describe/PostgreSQLComDescribeExecutor.java#L77-L113","documentation":"Error \"Unsupported SQL operation: Unsupported describe type: %s.\" thrown in apache/shardingsphere.","triggerScenarios":"PostgreSQLComDescribeExecutor receives a Describe message with an unsupported type indicator.","commonSituations":"Malformed extended-protocol Describe packets from buggy clients or middleboxes.","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."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e952770a215630a3659c75d64369168cd3e26b82","analyzedAt":"2026-08-14T13:54:53.392Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}