check contraint allows illegal value? - Mailing list pgsql-bugs

From missive@frontiernet.net (Lee Harr)
Subject check contraint allows illegal value?
Date
Msg-id slrn9lebha.o1.lee@troll.east.rochester.k12.ny.us
Whole thread Raw
Responses Re: check contraint allows illegal value?  (Bruce Momjian <pgman@candle.pha.pa.us>)
Re: check contraint allows illegal value?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
Is this a bug?

create table foo( c char(2)
    check (c in ('09', '10', '11', '12', 'n/a'))
);
CREATE

insert into foo values('09');
INSERT

insert into foo values('10');
INSERT

insert into foo values('08');
ExecAppend: rejected due to CHECK constraint foo_c

insert into foo values('n/a');
ExecAppend: rejected due to CHECK constraint foo_c



clearly this was a 'whups' on my part, but it would have
been nice to know that my constraint was bogus at the
time the table was created.

pgsql-bugs by date:

Previous
From: missive@frontiernet.net (Lee Harr)
Date:
Subject: Re: performance
Next
From: Bruce Momjian
Date:
Subject: Re: libpgtcl doesn't use UTF encoding of TCL