S

How to Use Enumerated Data Types with PostgreSQL

In the PostgreSQL database server, an enumerated (enum) type is a custom data type containing a list of permitted input values. You can map the PostgreSQL enum data types to a table using the `CREATE TABLE` command. Enum data types are suitable in scenarios where you want to move some validation logic to the database level and prevent users from inserting invalid data. Also, only use the enum data types in a table column that requires a clear set of items (usually around ten) that rarely change ......

Comments