Devart ODBC Driver for PostgreSQL supports the following functions for working with ENUM types.
| Function | Return type | Description |
|---|---|---|
enum_first(anyenum) |
anyenum |
Returns the first value defined in the input enum type’s order. |
enum_last(anyenum) |
anyenum |
Returns the last value defined in the input enum type’s order. |
enum_range(anyenum) |
anyarray |
Returns all values of the input enum type as a single ordered array. |
enum_range(anyenum, anyenum) |
anyarray |
Returns an ordered array of enum values between the two given bounds (inclusive). Both arguments must belong to the same enum type. If the first argument is NULL, the range starts from the first value of the enum; if the second argument is NULL, the range ends at the last value of the enum. |