Say I have created some user-defined types in the DB,
i.e. CREATE TYPE abc ...
CREATE TYPE abc ...
Is it then possible to determine if the user-defined type exists
Indeed, Postgres does not have CREATE OR REPLACE functionality for types. So the best approach is to drop it:
CREATE OR REPLACE
DROP TYPE IF EXISTS YOUR_TYPE; CREATE TYPE YOUR_TYPE AS ( id integer, field varchar );
Simple solution is always the best one.