Re: [GENERAL] Problem Using RowType Declaration with Table Domains

2010-06-23 Thread Merlin Moncure
On Tue, Jun 22, 2010 at 12:26 AM, Tom Lane wrote: > "George Weaver" writes: >> I have the following (very simplified) scenario: > >> CREATE DOMAIN orderstatus AS text NOT NULL DEFAULT 'Open'; > >> CREATE TABLE orders ( orderno serial >>                                          , status orderstatu

Re: [GENERAL] Problem Using RowType Declaration with Table Domains

2010-06-22 Thread Tom Lane
"George Weaver" writes: > I have the following (very simplified) scenario: > CREATE DOMAIN orderstatus AS text NOT NULL DEFAULT 'Open'; > CREATE TABLE orders ( orderno serial > , status orderstatus > , PRIMARY KEY

[GENERAL] Problem Using RowType Declaration with Table Domains

2010-06-21 Thread George Weaver
Hi all, I have the following (very simplified) scenario: CREATE DOMAIN orderstatus AS text NOT NULL DEFAULT 'Open'; ALTER DOMAIN orderstatus ADD CONSTRAINT orderstatus_valid CHECK (VALUE IN ('Open', 'Shipped', Cancelled')); CREATE TABLE orders ( orderno serial