RE: unique constraint - bug?
| От | Mikheev, Vadim |
|---|---|
| Тема | RE: unique constraint - bug? |
| Дата | |
| Msg-id | 8F4C99C66D04D4118F580090272A7A23018C66@SECTORBASE1 обсуждение исходный текст |
| Ответ на | unique constraint - bug? (Merrill Oveson <merrill@actarg.com>) |
| Список | pgsql-general |
> unique (a, b, c)
> );
>
> insert into letter values('1','2','3');
> insert into letter values('1','2','3');
>
> insert into letter (a,c) values ('1','3');
> insert into letter (a,c) values ('1','3');
>
> Notice that the second insert of ('1','2','3') yields an
> error message, which is the correct behavior - (that is the unique
> constaint is working), while the last insert of ('1','3') does not yield
> an error message - (that is the unique constraint doesn't work in this
> case - I think it should).
NULL != NULL - ie you can't say that both keys are equal.
(That's why PK constraint disallow NULLs...)
Vadim
В списке pgsql-general по дате отправления: