Add dependencies between catalog entries
Summary
Some entries rely on other entries. We already have the parent_id in EntryMeta, which provides a direct parent/child relationship.
We'll want to track other types of relationships as well. For example, creating an external table foo using connection bar means that foo is dependent on bar. Importantly this means that bar cannot be dropped before foo is dropped (or us on cascade ...). These are the type of dependencies we need to track.
I do not know what the implementation for this looks like. DuckDB and Postgres may be helpful here.
Specifications
- Add dependencies between catalog entries.
- Prevent dropping entries if other entries depend on it.
Rationale
Correctness.
Impact
Tasks
Check back mid Feb
Circle back when drop is ready
cc @RustomMS
Edit: Soft blocks on #550 #576
Would be other way around. Having dependencies would allow us to enforce not being able to drop connections that other tables depend on. Even then, I would say this is a strict blocker for either of those other issues if we're fine with potentially broken tables, which we can clean up later.
Thanks for clarification - I'm unsure of the risks of dropping tables without constraints or cascades, but I get that DROP support is multi-faceted just considering this and those issues.