Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/pages/postgraphile/enums.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@ create table pets (
);
```

The `@enum` smart comments can be used to set the name (`@enumName`)
or the description (`@enumDescription`) of PostgreSQL enums.

e.g.:
```sql
COMMENT ON TYPE animal_type IS E'@enum\n@enumName TypeOfAnimal';
```

Sometimes people prefer not to use PostgreSQL enums due to their technical
limitations (e.g. you can never drop a value from a PostgreSQL enum, and you
cannot add a value to it within a transaction). There are other ways to add
Expand Down