How does PostgreSQL treat null values in unique composite constraints???
В списке pgsql-admin по дате отправления:
| От | P G |
|---|---|
| Тема | How does PostgreSQL treat null values in unique composite constraints??? |
| Дата | |
| Msg-id | 20030408181332.49933.qmail@web13310.mail.yahoo.com обсуждение |
| Ответы |
Re: How does PostgreSQL treat null values in unique composite
Re: How does PostgreSQL treat null values in unique composite |
| Список | pgsql-admin |
I have the following table with a unique constraint. create table testt ( id int, aa int, bb int, constraint pk_testt primary key (id), constraint cons_testt unique (aa,bb)); Let's say I insert the following: insert into testt values (1,2,null); insert into testt values (2,2,null); I thought this should fail because of the unique constraint, but it doesn't. How does PostgreSQL view the null values in this constraint? Will someone explain why I am allowed to make this insertion? TIA. __________________________________________________ Do you Yahoo!? Yahoo! Tax Center - File online, calculators, forms, and more http://tax.yahoo.com
В списке pgsql-admin по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера