| От | Doug McNaught |
|---|---|
| Тема | Re: Adding UNIQUE constraint on NULL column |
| Дата | |
| Msg-id | 87acrdxt0f.fsf@asmodeus.mcnaught.org обсуждение исходный текст |
| Ответ на | Adding UNIQUE constraint on NULL column (Dave Smith <dave.smith@candata.com>) |
| Ответы |
Re: Adding UNIQUE constraint on NULL column
|
| Список | pgsql-general |
Dave Smith <dave.smith@candata.com> writes: > I am trying to add a unique constraint on a column that can be null. The > documentation states that null is treated as non equal values but I want > them to be equal. Is there another way of doing this other than writing > a before insert trigger? UNIQUE constraints on NULLable columns work fine. It's not clear from the above what you're looking for. Are you really saying that you want 'NULL = NULL' to return 't'? -Doug
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера