Hello @EjB
For the given example, here is the response:
Will DROP SCHEMA schema_a CASCADE remove or affect tables in schema_b?
No, unless:
1. The tables in schema_a are managed tables, AND
2. Tables in schema_b store their data physically inside /schema_a/, or
3. Both schemas use a shared storage path
In other words, if a table in schema_b references a path like /schema_a/some_shared_data, or if both schemas store data in a shared directory (e.g., /data/project/shared/), then dropping schema_a may delete those shared files but only if the schema being dropped is managed and owns those files.
For external tables, dropping schema_a will not impact schema_b, even if they share the same root location. This is because dropping external tables only removes the metadata, not the actual files in the storage location.
Hope that helps, let me know if you need to clarify more on this. Best, Ilir