Re: Remove implicit unique index creation on SERIAL columns?
| От | Bruce Momjian |
|---|---|
| Тема | Re: Remove implicit unique index creation on SERIAL columns? |
| Дата | |
| Msg-id | 200208200317.g7K3Htp19255@candle.pha.pa.us обсуждение |
| Ответ на | Re: Remove implicit unique index creation on SERIAL columns? (Stephan Szabo <sszabo@megazone23.bigpanda.com>) |
| Список | pgsql-hackers |
Stephan Szabo wrote: > > If don't understand. We already have a unique index on the SERIAL > > column, so why bother rejecting an insert/update that supplies the > > value? We need the column to be unique, and that is forced, but why > > prevent _any_ unique value from being used. > > One reason is that the sequence won't respect those inserted values and > you'll get uniqueness errors on statements that don't give a value for the > column where you'd expect to be getting a working autogenerated value. Oh, it causes problems later on. Interesting. However, preventing INSERT/UPDATE seems quite extreme. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001+ If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania19073
В списке pgsql-hackers по дате отправления: