check constraint bug? - Mailing list pgsql-sql

From Tarlika Elisabeth Schmitz
Subject check constraint bug?
Date
Msg-id 20110506060608.12bd24b0@dick.coachhouse
Whole thread Raw
Responses Re: check constraint bug?
List pgsql-sql
I specified:

ALTER TABLE h ADD CONSTRAINT val_h_stats
CHECK (NOT (sex = 'f') AND (stats IS NOT NULL));

which was translated to:

ALTER TABLE h ADD CONSTRAINT val_h_stats 
CHECK (NOT sex = 'f'::bpchar AND stats IS NOT NULL);


Can the expression not be bracketed?


I changed this to:
ALTER TABLE horse ADD CONSTRAINT val_horse_stats
CHECK (sex != 'f') OR (stats IS NULL));


-- 

Best Regards,
Tarlika Elisabeth Schmitz


pgsql-sql by date:

Previous
From: Claudio Adriano Guarracino
Date:
Subject: Re: Select and merge rows?
Next
From: Scott Marlowe
Date:
Subject: Re: check constraint bug?