check contraint allows illegal value?

Поиск
Список
Период
Сортировка
От missive@frontiernet.net (Lee Harr)
Тема check contraint allows illegal value?
Дата
Msg-id slrn9lebha.o1.lee@troll.east.rochester.k12.ny.us
обсуждение исходный текст
Ответы 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>)
Список 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 по дате отправления:

Предыдущее
От: missive@frontiernet.net (Lee Harr)
Дата:
Сообщение: Re: performance
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: libpgtcl doesn't use UTF encoding of TCL