prestodb/presto · warning · SQLFeatureNotSupportedException
privileges not supported
Error message
privileges not supported
What it means
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.
Source
Thrown at presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoDatabaseMetaData.java:993
"FROM system.jdbc.columns");
List<String> filters = new ArrayList<>();
emptyStringEqualsFilter(filters, "TABLE_CAT", catalog);
emptyStringLikeFilter(filters, "TABLE_SCHEM", schemaPattern);
optionalStringLikeFilter(filters, "TABLE_NAME", tableNamePattern);
optionalStringLikeFilter(filters, "COLUMN_NAME", columnNamePattern);
buildFilters(query, filters);
query.append("\nORDER BY TABLE_CAT, TABLE_SCHEM, TABLE_NAME, ORDINAL_POSITION");
return select(query.toString());
}
@Override
public ResultSet getColumnPrivileges(String catalog, String schema, String table, String columnNamePattern)
throws SQLException
{
throw new SQLFeatureNotSupportedException("privileges not supported");
}
@Override
public ResultSet getTablePrivileges(String catalog, String schemaPattern, String tableNamePattern)
throws SQLException
{
throw new SQLFeatureNotSupportedException("privileges not supported");
}
@Override
public ResultSet getBestRowIdentifier(String catalog, String schema, String table, int scope, boolean nullable)
throws SQLException
{
throw new SQLFeatureNotSupportedException("row identifiers not supported");
}
@Override
public ResultSet getVersionColumns(String catalog, String schema, String table)View on GitHub (pinned to 55bb57d202)
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
Defensive patterns
Strategy: try-catch
Validate before calling
// capability check before calling
DatabaseMetaData md = conn.getMetaData();
// Presto does not support column privileges; guard by product name
if (md.getDatabaseProductName().contains("Presto")) {
return Collections.emptyList();
} Try / catch
try (ResultSet rs = md.getColumnPrivileges(catalog, schema, table, colPattern)) {
return readPrivileges(rs);
} catch (SQLFeatureNotSupportedException e) {
return Collections.emptyList();
} Prevention
- Whitelist which DatabaseMetaData methods your tooling calls per database
- Handle SQLFeatureNotSupportedException generically in metadata crawlers
- Use Presto system tables for privilege info where available
When it happens
Trigger: Calling DatabaseMetaData.getColumnPrivileges(catalog, schema, table, columnNamePattern) on a Presto connection; schema-migration or security-audit tools that enumerate grants per column.
Common situations: 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.
Related errors
- row identifiers not supported
- version columns not supported
- primary keys not supported
- Result set type must be TYPE_FORWARD_ONLY
- Result set concurrency must be CONCUR_READ_ONLY
AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04).
Data as JSON: /api/errors/feb6d9564ba7cd14.
Report an issue: GitHub.