On Thu, May 5, 2011 at 11:06 PM, Tarlika Elisabeth Schmitz <postgres...@numerixtechnology.de> wrote: > 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);
You need another level of parens: CHECK (NOT ((sex = 'f') AND (stats IS NOT NULL))); -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql