Skip to content

Instantly share code, notes, and snippets.

@pierrejoubert73 pierrejoubert73/enums.sql
Last active Nov 21, 2016

Embed
What would you like to do?
How to view and alter enumerated types in PostgeSQL.
-- To view all values in the enum:
SELECT unnest(enum_range(NULL::schema.enum_name));
-- To add a value to the enum:
ALTER TYPE schema.enum_name ADD VALUE 'new_enum_value';
-- For more operation see: https://www.postgresql.org/docs/9.1/static/sql-altertype.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.