In various places, we use non-qualified type names (i.e. if the schema is pg_catalog, sometimes also public), and it's quite messy and causes issues (e.g. #4365).
We should switch to a simple TypeIdentifier struct which the type's schema and name, and always compare that.
See notably #4382.