{"record":{"id":"664a72d7093ae4db","repo":"prestodb/presto","slug":"getgeneratedkeys","errorCode":null,"errorMessage":"getGeneratedKeys","messagePattern":"getGeneratedKeys","errorType":"exception","errorClass":"SQLFeatureNotSupportedException","httpStatus":null,"severity":"error","filePath":"presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoStatement.java","lineNumber":475,"sourceCode":"        currentUpdateType.set(null);\n\n        if (current == CLOSE_CURRENT_RESULT) {\n            closeResultSet();\n            return false;\n        }\n\n        if (current != KEEP_CURRENT_RESULT && current != CLOSE_ALL_RESULTS) {\n            throw new SQLException(\"Invalid argument: \" + current);\n        }\n\n        throw new SQLFeatureNotSupportedException(\"Multiple open results not supported\");\n    }\n\n    @Override\n    public ResultSet getGeneratedKeys()\n            throws SQLException\n    {\n        throw new SQLFeatureNotSupportedException(\"getGeneratedKeys\");\n    }\n\n    @Override\n    public int executeUpdate(String sql)\n            throws SQLException\n    {\n        return Ints.saturatedCast(executeLargeUpdate(sql));\n    }\n\n    @Override\n    public int executeUpdate(String sql, int autoGeneratedKeys)\n            throws SQLException\n    {\n        return executeUpdate(sql);\n    }\n\n    @Override\n    public int executeUpdate(String sql, int[] columnIndexes)","sourceCodeStart":457,"sourceCodeEnd":493,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoStatement.java#L457-L493","documentation":"getGeneratedKeys in PrestoStatement always throws SQLFeatureNotSupportedException after checkOpen(): the Presto engine does not return auto-generated keys, so this JDBC feature is unimplemented regardless of the executed statement.","triggerScenarios":"Thrown at presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoStatement.java:475 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Generate identifiers client-side (e.g. UUIDs) before inserting","Retrieve assigned keys via a follow-up SELECT (query the table's metadata/last value)","Catch SQLFeatureNotSupportedException in generic key-retrieval code paths"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}