Let’s say we’ve defined a postgresql type:
CREATE TYPE my_type AS ENUM('foo', 'bar');
Is there any way to show the type definition after creation ?
I would expect “\d my_type” to show me “ENUM(‘foo’, ‘bar’)”, but it says :
Did not find any relation named "my_type"
The pg_type table doesn’t seem to give enough information.
It’s \dT you’re after, but it doesn’t give it as a “CREATE” statement. You use \dD for domains.