| От | Steve Lefevre |
|---|---|
| Тема | Re: collision in serial numbers after INSERT? |
| Дата | |
| Msg-id | 4660A57C.6050101@osu.edu обсуждение исходный текст |
| Ответ на | Re: collision in serial numbers after INSERT? (Bill Moran <wmoran@potentialtech.com>) |
| Ответы |
Re: collision in serial numbers after INSERT?
|
| Список | pgsql-general |
Bill Moran wrote: > Don't do that. Please let us know what site recommended that so I can > send an email to the author correcting them. > Hello Bill - The 'offending' site and article is at http://www.sitepoint.com/article/site-mysql-postgresql-2/3 > Instead, do SELECT currval('<seqname>'), which is guaranteed to be isolated > from other sessions. > I've also gotten other advice to SELECT next_val ( whatever the exact wording is) will reserve that serial number for you. Is that true? So l > If you use the code above, sooner or later you're going to get bit. > Thanks!
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера