SHOW TYPES

On this page Carat arrow pointing down

The SHOW TYPES statement lists the user-defined data types in the current database.

Syntax

SHOW TYPES

Required privileges

The CONNECT privilege on the database is required to list any user-defined types in the database.

Examples

The following example creates a user-defined type.

icon/buttons/copy
> CREATE TYPE weekday AS ENUM ('monday', 'tuesday', 'wednesday', 'thursday', 'friday');
icon/buttons/copy
> CREATE TYPE weekend AS ENUM ('sunday', 'saturday');
icon/buttons/copy
> SHOW TYPES;
  schema |  name   | owner
---------+---------+--------
  public | weekday | root
  public | weekend | root
(2 rows)

See also


Yes No
On this page

Yes No