Skip to content

See enum type values in psql session

Joel Meador edited this page Jun 8, 2026 · 1 revision

How do you see values for an enum type in postgresql session?

Start up psql session

$ psql

select your database

user=# \c my_db

METHOD 1

my_db=# \dT+ enum_type

...results

-[ RECORD 1 ]-----+-----------------------
Schema            | public
Name              | enum_type
Internal name     | enum_type
Size              | 4
Elements          | Other                 +
                  | School                +
                  | Senior Living Facility
Owner             | postgres
Access privileges |
Description       |

METHOD 2

my_db=# select enum_range(enum_first(null::enum_type),null::enum_type);

...results

               enum_range
-----------------------------------------
 {Other,School,"Senior Living Facility"}
(1 row)

Home

TODO: can we recreate the tag system here roughly with sections about certain subjects?

Clone this wiki locally