Is there a way to drop all the data types listed by \dT+
.
I know you can drop types individually via DROP TYPE
command, but I have a lot of types and it's painstaking to drop them all individually.
Is there a way to drop all the data types listed by \dT+
.
I know you can drop types individually via DROP TYPE
command, but I have a lot of types and it's painstaking to drop them all individually.
Following the directions suggested by user Schwern, I used psql -E
and got this to work:
SELECT typname, typnamespace from pg_type;
typnamespace
your types are associated withDELETE FROM pg_type WHERE typnamespace=${your_typnamespace}