bruno@wolff.to (Bruno Wolff III) writes:
> Using domains is a good way to keep column constraints in just one place.
>
Speaking of domains, how do you find out what the range of a domain
is?
eg:
test=# create domain fruit as text
check( value in ('apple', 'orange', 'banana', 'pear'));
CREATE DOMAIN
test=# \dD fruit
List of domains
Schema | Name | Type | Modifier
--------+-------+------+----------
public | fruit | text |
(1 row)
test=# \dD+ fuit
List of domains
Schema | Name | Type | Modifier
--------+-------+------+----------
public | fruit | text |
(1 row)
A quick look through pg_catalog doesn't suggest anything that would
return the check conditions - Is there any way to do this?
--
Remove -42 for email