{"record":{"id":"ffc1457f82109b0b","repo":"prestodb/presto","slug":"updateblob","errorCode":null,"errorMessage":"updateBlob","messagePattern":"updateBlob","errorType":"exception","errorClass":"SQLFeatureNotSupportedException","httpStatus":null,"severity":"error","filePath":"presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoResultSet.java","lineNumber":1243,"sourceCode":"    @Override\n    public void updateRef(int columnIndex, Ref x)\n            throws SQLException\n    {\n        throw new SQLFeatureNotSupportedException(\"updateRef\");\n    }\n\n    @Override\n    public void updateRef(String columnLabel, Ref x)\n            throws SQLException\n    {\n        throw new SQLFeatureNotSupportedException(\"updateRef\");\n    }\n\n    @Override\n    public void updateBlob(int columnIndex, Blob x)\n            throws SQLException\n    {\n        throw new SQLFeatureNotSupportedException(\"updateBlob\");\n    }\n\n    @Override\n    public void updateBlob(String columnLabel, Blob x)\n            throws SQLException\n    {\n        throw new SQLFeatureNotSupportedException(\"updateBlob\");\n    }\n\n    @Override\n    public void updateClob(int columnIndex, Clob x)\n            throws SQLException\n    {\n        throw new SQLFeatureNotSupportedException(\"updateClob\");\n    }\n\n    @Override\n    public void updateClob(String columnLabel, Clob x)","sourceCodeStart":1225,"sourceCodeEnd":1261,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoResultSet.java#L1225-L1261","documentation":"Sentinel unsupported-operation method in PrestoResultSet: the JDBC driver does not support Blob updates on a result set, so updateBlob always throws SQLFeatureNotSupportedException with the method name as the message. Calling it from client code is the only trigger.","triggerScenarios":"Calling rs.updateBlob(columnIndex, blob) on any PrestoResultSet.","commonSituations":"Binary-write code ported from MySQL/PostgreSQL apps; frameworks that write binary columns through updatable result sets.","solutions":["Insert/update binary data with PreparedStatement.setBytes (mapped to VARBINARY)","Never attempt in-place ResultSet updates with the Presto driver","If large object streaming is required, chunk the data at the application level"],"exampleFix":"// before\nrs.updateBlob(1, blob);\nrs.updateRow();\n// after\ntry (PreparedStatement ps = conn.prepareStatement(\"UPDATE t SET data = ? WHERE id = ?\")) {\n    ps.setBytes(1, bytes);\n    ps.setLong(2, id);\n    ps.executeUpdate();\n}","handlingStrategy":"validation","validationCode":"DatabaseMetaData md = conn.getMetaData();\nif (!md.supportsResultSetConcurrency(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE)) { /* use UPDATE with setBytes */ }","typeGuard":null,"tryCatchPattern":"try {\n    rs.updateBlob(columnIndex, blob);\n} catch (SQLFeatureNotSupportedException e) {\n    // fall back to PreparedStatement with setBytes\n}","preventionTips":["Write binary data via PreparedStatement.setBytes","Never rely on updatable result sets or Blob LOCATORs with Presto","Chunk large payloads at the application level"],"tags":["jdbc","unsupported-feature","read-only-resultset"],"backgroundTag":"unsupported-jdbc-feature","analyzedSha":"55bb57d202de3b926896fa966c2c4a44c779634e","analyzedAt":"2026-09-04T12:50:26.162Z","contentChangedAt":"2026-09-04T12:50:26.162Z","schemaVersion":2},"datasetVersion":"2026-09-11T21:17:09.523Z"}