Greenplum ENUM

Tue 21 January 2014 | -- (permalink)

Did you know green plum doesn't support ENUMs? Apparently they were added to Postgres in 8.3 (right after Greenplum forked).

However you can create a domain to get some of the same behavior.

CREATE DOMAIN weather

VARCHAR(10) CHECK (VALUE IN ('rain', 'snow'));

You don't get the storage space benefits but you can use it to enforce constraints. The other option is to use a lookup table.<