I am trying to find the equivalent SQL of \dT using the information_schema and can’t seem to find anything. Does such a thing exist?
Example: If I add the following custom type enum, how can I see it in the information_schema?
CREATE TYPE communication.channels AS ENUM
('text_message',
'email',
'phone_call',
'broadcast');
NOTE: I do have the exact SQL used by \dT (retrieved by turning up the logging) but I am looking specifically for a cleaner implementation using the information_schema
Enums are not in the SQL standard and therefore not represented in the information schema. Other user-defined types would normally be in the view
user_defined_types, but that’s not implemented. So at the moment, you can’t use the information schema to list user-defined types in PostgreSQL.