On this page
The SHOW TYPES
statement lists the user-defined data types in the current database.
Note:
CockroachDB currently only supports enumerated user-defined types. As a result, SHOW ENUMS
and SHOW TYPES
return the same results.
Syntax
SHOW TYPES
Required privileges
The SELECT
privilege on the database is required to list any user-defined types in the database.
Examples
> CREATE TYPE weekday AS ENUM ('monday', 'tuesday', 'wednesday', 'thursday', 'friday');
> CREATE TYPE weekend AS ENUM ('sunday', 'saturday');
> SHOW TYPES;
schema | name | value
---------+---------+-------------------------------------------
public | weekday | monday|tuesday|wednesday|thursday|friday
public | weekend | sunday|saturday
(2 rows)