Enum Functions
9.10. Enum Support Functions
For enum types (described in Section 8.7), there are several functions that allow cleaner programming without hard-coding particular values of an enum type. These are listed in Table 9-30. The examples assume an enum type created as:
CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple');
Table 9-30. Enum Support Functions
Function | Description | Example | Example Result |
---|---|---|---|
enum_first(anyenum) | Returns the first value of the input enum type | 登录查看完整内容
|