{"record":{"id":"4be217f73b00a2bf","repo":"prestodb/presto","slug":"row-identifiers-not-supported","errorCode":null,"errorMessage":"row identifiers not supported","messagePattern":"row identifiers not supported","errorType":"exception","errorClass":"SQLFeatureNotSupportedException","httpStatus":null,"severity":"warning","filePath":"presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoDatabaseMetaData.java","lineNumber":1007,"sourceCode":"    @Override\n    public ResultSet getColumnPrivileges(String catalog, String schema, String table, String columnNamePattern)\n            throws SQLException\n    {\n        throw new SQLFeatureNotSupportedException(\"privileges not supported\");\n    }\n\n    @Override\n    public ResultSet getTablePrivileges(String catalog, String schemaPattern, String tableNamePattern)\n            throws SQLException\n    {\n        throw new SQLFeatureNotSupportedException(\"privileges not supported\");\n    }\n\n    @Override\n    public ResultSet getBestRowIdentifier(String catalog, String schema, String table, int scope, boolean nullable)\n            throws SQLException\n    {\n        throw new SQLFeatureNotSupportedException(\"row identifiers not supported\");\n    }\n\n    @Override\n    public ResultSet getVersionColumns(String catalog, String schema, String table)\n            throws SQLException\n    {\n        throw new SQLFeatureNotSupportedException(\"version columns not supported\");\n    }\n\n    @Override\n    public ResultSet getPrimaryKeys(String catalog, String schema, String table)\n            throws SQLException\n    {\n        throw new SQLFeatureNotSupportedException(\"primary keys not supported\");\n    }\n\n    @Override\n    public ResultSet getImportedKeys(String catalog, String schema, String table)","sourceCodeStart":989,"sourceCodeEnd":1025,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoDatabaseMetaData.java#L989-L1025","documentation":"PrestoDatabaseMetaData.getBestRowIdentifier() unconditionally throws SQLFeatureNotSupportedException. This DatabaseMetaData method reports a minimal set of columns that uniquely identify a row, which presumes primary-key-like semantics Presto tables do not have. The driver rejects it instead of returning a fabricated result.","triggerScenarios":"Calling DatabaseMetaData.getBestRowIdentifier(catalog, schema, table, scope, nullable); updatable-row tooling that needs a row identifier to build keyset-based updates.","commonSituations":"ORMs or data-sync tools locating rows for optimistic locking; GUIs that call it to render key columns; generic JDBC frameworks probing identifier columns before updates.","solutions":["Catch SQLFeatureNotSupportedException and treat the table as having no row identifier","Use known business keys / partition columns from your own schema knowledge","Do not attempt keyset-based updates against Presto via JDBC metadata"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"if (md.getDatabaseProductName().contains(\"Presto\")) {\n    return null; // no row identifier available\n}","typeGuard":null,"tryCatchPattern":"try (ResultSet rs = md.getBestRowIdentifier(catalog, schema, table, scope, nullable)) {\n    return readIdentifier(rs);\n} catch (SQLFeatureNotSupportedException e) {\n    return null;\n}","preventionTips":["Do not build updatable-cursor/keyset logic on JDBC metadata for Presto","Track business keys in your own schema metadata","Skip getBestRowIdentifier in generic metadata crawlers for Presto"],"tags":["jdbc","metadata","unsupported-feature","presto"],"backgroundTag":"sqlfeaturenotsupported","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"}