prestodb/presto · error · SemanticException
MISSING_CATALOG
MISSING_CATALOG
Error message
Target catalog '%s' does not exist
What it means
Validation in RenameViewTask.execute while resolving the ALTER VIEW ... RENAME target: the catalog portion of the target qualified name is not registered with this coordinator, so the renamed view could not be placed there.
Source
Thrown at presto-main-base/src/main/java/com/facebook/presto/execution/RenameViewTask.java:61
{
return "RENAME VIEW";
}
public ListenableFuture<?> execute(RenameView statement, TransactionManager transactionManager, Metadata metadata, AccessControl accessControl, Session session, List<Expression> parameters, WarningCollector warningCollector, String query)
{
QualifiedObjectName viewName = createQualifiedObjectName(session, statement, statement.getSource(), metadata);
Optional<ViewDefinition> view = metadata.getMetadataResolver(session).getView(viewName);
if (!view.isPresent()) {
if (!statement.isExists()) {
throw new SemanticException(MISSING_VIEW, statement, "View '%s' does not exist", viewName);
}
return immediateFuture(null);
}
QualifiedObjectName target = createQualifiedObjectName(session, statement, statement.getTarget(), metadata);
if (!metadata.getCatalogHandle(session, target.getCatalogName()).isPresent()) {
throw new SemanticException(MISSING_CATALOG, statement, "Target catalog '%s' does not exist", target.getCatalogName());
}
if (metadata.getMetadataResolver(session).getView(target).isPresent()) {
throw new SemanticException(VIEW_ALREADY_EXISTS, statement, "Target view '%s' already exists", target);
}
if (!viewName.getSchemaName().equals(target.getSchemaName())) {
throw new SemanticException(NOT_SUPPORTED, statement, "View rename across schemas is not supported");
}
if (!viewName.getCatalogName().equals(target.getCatalogName())) {
throw new SemanticException(NOT_SUPPORTED, statement, "View rename across catalogs is not supported");
}
accessControl.checkCanRenameView(session.getRequiredTransactionId(), session.getIdentity(), session.getAccessControlContext(), viewName, target);
metadata.renameView(session, viewName, target);
return immediateFuture(null);
}
}View on GitHub (pinned to 55bb57d202)
Solutions
- Confirm the target catalog exists with SHOW CATALOGS and fix the spelling
- Rename the view within its current catalog and schema
- Create or mount the target catalog before retrying the rename
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at presto-main-base/src/main/java/com/facebook/presto/execution/RenameViewTask.java:61 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04).
Data as JSON: /api/errors/c2661baacfe052b5.
Report an issue: GitHub.