# CONSTRAINT test FOREIGN KEY (id_tab_key) REFERENCES tab(id) ON DELETE cascade ON UPDATE CASCADE
ERROR: cannot drop table tab because other objects depend on it
Yeah, ON DELETE and ON CASCADE are not the answer to your question.
pg_restore won't drop objects in cascade. There's no option for that. I'd guess the reason is that --clean only cleans the object it will restore. If other objects depend on it, pg_restore has no way to know how to recreate them, and you would end up with a not completely restored database.
The --clean option of pg_restore allows you to replace an object before being imported. However, dependencies such as foreign keys or views prevent the deletion of the object. Is there a way to add the cascade option to force the deletion?