CREATE DOMAIN is the answer:
CREATE DOMAIN mytype AS INT2 CHECK(VALUE>=1 AND VALUE<=6);
On Mon, 2004-07-19 at 10:43, raptor@tvskat.net wrote:
hi,
Is it possible in Postgre to have enum type, so that later table fileld get values from 1-6 (saving space)
1 - statex
2 - stateY
3 - stateZ
something like that and then constrain on this enum type..
tia
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)