{"record":{"id":"feb6d9564ba7cd14","repo":"prestodb/presto","slug":"privileges-not-supported","errorCode":null,"errorMessage":"privileges not supported","messagePattern":"privileges not supported","errorType":"exception","errorClass":"SQLFeatureNotSupportedException","httpStatus":null,"severity":"warning","filePath":"presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoDatabaseMetaData.java","lineNumber":993,"sourceCode":"                \"FROM system.jdbc.columns\");\n\n        List<String> filters = new ArrayList<>();\n        emptyStringEqualsFilter(filters, \"TABLE_CAT\", catalog);\n        emptyStringLikeFilter(filters, \"TABLE_SCHEM\", schemaPattern);\n        optionalStringLikeFilter(filters, \"TABLE_NAME\", tableNamePattern);\n        optionalStringLikeFilter(filters, \"COLUMN_NAME\", columnNamePattern);\n        buildFilters(query, filters);\n\n        query.append(\"\\nORDER BY TABLE_CAT, TABLE_SCHEM, TABLE_NAME, ORDINAL_POSITION\");\n\n        return select(query.toString());\n    }\n\n    @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)","sourceCodeStart":975,"sourceCodeEnd":1011,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoDatabaseMetaData.java#L975-L1011","documentation":"PrestoDatabaseMetaData.getColumnPrivileges() unconditionally throws SQLFeatureNotSupportedException. Presto's protocol exposes no per-column grant/revoke metadata, so the driver declares this DatabaseMetaData capability as unsupported rather than returning an empty result set. Any tooling introspecting column privileges will fail.","triggerScenarios":"Calling DatabaseMetaData.getColumnPrivileges(catalog, schema, table, columnNamePattern) on a Presto connection; schema-migration or security-audit tools that enumerate grants per column.","commonSituations":"Database administration GUIs (DBeaver, DataGrip) probing privileges while expanding the tree; ORM schema tooling (e.g. hibernate reverse engineering) collecting full metadata; migration frameworks doing permission diffs.","solutions":["Catch SQLFeatureNotSupportedException and treat as 'privileges not available'","Skip privilege introspection for Presto catalogs in your tooling configuration","Query Presto's own system metadata tables (e.g. system.metadata) for what is available instead"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// capability check before calling\nDatabaseMetaData md = conn.getMetaData();\n// Presto does not support column privileges; guard by product name\nif (md.getDatabaseProductName().contains(\"Presto\")) {\n    return Collections.emptyList();\n}","typeGuard":null,"tryCatchPattern":"try (ResultSet rs = md.getColumnPrivileges(catalog, schema, table, colPattern)) {\n    return readPrivileges(rs);\n} catch (SQLFeatureNotSupportedException e) {\n    return Collections.emptyList();\n}","preventionTips":["Whitelist which DatabaseMetaData methods your tooling calls per database","Handle SQLFeatureNotSupportedException generically in metadata crawlers","Use Presto system tables for privilege info where available"],"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"}