# PostgreSQL Data Types: ENUM

DevFeed: [PostgreSQL Data Types: ENUM](<https://devfeed.tech/articles/postgresql-data-types-enum-34596.md>)

Original publisher: [Read original article](<https://tapoueh.org/blog/2018/05/postgresql-data-types-enum/>)

Author: Dimitri Fontaine PostgreSQL Major Contributor; Author

Published: 2018-05-02T09:00:26Z

Content type: tutorial

Language: en

Sources: [Dimitri Fontaine](<https://devfeed.tech/sources/dimitri-fontaine.md>)

Topics: [PostgreSQL](<https://devfeed.tech/topics/postgresql.md>), [data type](<https://devfeed.tech/topics/data-type.md>), [enum](<https://devfeed.tech/topics/enum.md>), [MySQL](<https://devfeed.tech/topics/mysql.md>)

Tags: [alter](<https://devfeed.tech/tags/alter.md>), [data-type](<https://devfeed.tech/tags/data-type.md>), [database](<https://devfeed.tech/tags/database.md>), [enum](<https://devfeed.tech/tags/enum.md>), [join](<https://devfeed.tech/tags/join.md>), [mysql](<https://devfeed.tech/tags/mysql.md>), [postgresql](<https://devfeed.tech/tags/postgresql.md>), [table](<https://devfeed.tech/tags/table.md>)

## AI overview

This tutorial compares PostgreSQL ENUM types with reference tables and foreign keys. It explains how PostgreSQL registers ENUM types, how values are stored, and why changing accepted values is a DDL operation with transaction restrictions. The article recommends ENUMs for very static value sets and reference tables when values or ordering may change.

## Source excerpt

Continuing our series of PostgreSQL Data Types today we're going to introduce the PostgreSQL ENUM type. This data type has been added to PostgreSQL in order to make it easier to support migrations from MySQL. Proper relational design would use a reference table and a foreign key instead.