Skip to content

Commit a611da7

Browse files
authored
Merge pull request #30902 from benesch/create-connection-notice
adapter: emit existence notice in CREATE CONNECTION IF NOT EXISTS
2 parents cc8d3e7 + 624ac3f commit a611da7

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/adapter/src/coord/sequencer/inner.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -889,7 +889,13 @@ impl Coordinator {
889889
Err(AdapterError::Catalog(mz_catalog::memory::error::Error {
890890
kind:
891891
mz_catalog::memory::error::ErrorKind::Sql(CatalogError::ItemAlreadyExists(_, _)),
892-
})) if plan.if_not_exists => Ok(ExecuteResponse::CreatedConnection),
892+
})) if plan.if_not_exists => {
893+
session.add_notice(AdapterNotice::ObjectAlreadyExists {
894+
name: plan.name.item,
895+
ty: "connection",
896+
});
897+
Ok(ExecuteResponse::CreatedConnection)
898+
}
893899
Err(err) => Err(err),
894900
}
895901
}

0 commit comments

Comments
 (0)