I have created a datatype in PostgreSQL using folloing line:
CREATE TYPE ABC AS (A CHARACTER(1), B CHARACTER(2), C BIGINT);
I didn't define this datatype. Now I want to delete this prototype. What is the way or command to delete this?
You can remove a data type using
DROP TYPE type_name;
Click here for manual reference for DROP TYPE
Remember, that if you have other objects that depend on the type you are trying to delete, it would yield an error
ERROR: cannot drop type type_name because other objects depend on it
with list of dependencies.
If you would also like to DROP
those objects type
DROP TYPE type_name CASCADE;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With