{"record":{"id":"9fc4779560fcc56b","repo":"prestodb/presto","slug":"version-columns-not-supported","errorCode":null,"errorMessage":"version columns not supported","messagePattern":"version columns not supported","errorType":"exception","errorClass":"SQLFeatureNotSupportedException","httpStatus":null,"severity":"warning","filePath":"presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoDatabaseMetaData.java","lineNumber":1014,"sourceCode":"    @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)\n            throws SQLException\n    {\n        throw new SQLFeatureNotSupportedException(\"imported keys not supported\");\n    }\n\n    @Override\n    public ResultSet getExportedKeys(String catalog, String schema, String table)","sourceCodeStart":996,"sourceCodeEnd":1032,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoDatabaseMetaData.java#L996-L1032","documentation":"PrestoDatabaseMetaData.getVersionColumns() unconditionally throws SQLFeatureNotSupportedException. This method is meant to report columns tracking row version/timestamp for optimistic concurrency; Presto tables have no such pseudo-columns, so the driver rejects the call.","triggerScenarios":"Calling DatabaseMetaData.getVersionColumns(catalog, schema, table); optimistic-locking frameworks querying which columns track row updates.","commonSituations":"JPA/Hibernate-style tooling resolving version columns generically; migration tools probing full DatabaseMetaData surface; ORMs configured for updatable result sets.","solutions":["Catch SQLFeatureNotSupportedException and treat as no version columns","Model versioning explicitly with your own updated_at/version column in table schemas","Skip this metadata call for Presto in generic introspection loops"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"if (md.getDatabaseProductName().contains(\"Presto\")) {\n    return Collections.emptyList(); // no version columns\n}","typeGuard":null,"tryCatchPattern":"try (ResultSet rs = md.getVersionColumns(catalog, schema, table)) {\n    return readVersionColumns(rs);\n} catch (SQLFeatureNotSupportedException e) {\n    return Collections.emptyList();\n}","preventionTips":["Manage optimistic locking with explicit schema columns, not JDBC metadata","Skip getVersionColumns in generic introspection loops","Catch SQLFeatureNotSupportedException around all metadata calls"],"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"}