Why doesn't the SERIAL data type automatically have a UNIQUE CONSTRAINT
В списке pgsql-sql по дате отправления:
| От | Ferindo Middleton Jr |
|---|---|
| Тема | Why doesn't the SERIAL data type automatically have a UNIQUE CONSTRAINT |
| Дата | |
| Msg-id | 4338961E.20100@verizon.net обсуждение исходный текст |
| Ответы |
Re: Why doesn't the SERIAL data type automatically have a UNIQUE CONSTRAINT
|
| Список | pgsql-sql |
Is there some reason why the SERIAL data type doesn't automatically have a UNIQUE CONSTRAINT. It seems that the main reason for using it is so that the value for this field keeps changing automatically and is never null so any one record can be identified using it- So why not imply that it is always be UNIQUE anyway. I mean, if you were to force another value on a SERIAL field that already had that same value, the would through the sequence tracking the the fields current value off any way, so it just makes sense to me to not let a serial field be duplicated. Let's take a poll. Is there anyone out there who actually uses the SERIAL data type who would not want it to be UNIQUE? Ferindo
В списке pgsql-sql по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера