| От | Thomas Kellerer |
|---|---|
| Тема | Re: SERIAL order and INSERT order |
| Дата | |
| Msg-id | it9mhs$ovc$1@dough.gmane.org обсуждение исходный текст |
| Ответ на | SERIAL order and INSERT order (l1@nym.hush.com) |
| Ответы |
Re: SERIAL order and INSERT order
|
| Список | pgsql-novice |
l1@nym.hush.com, 14.06.2011 20:30: > Are there any cases where an observer might see a row with serial > number 2 but not yet see serial number 1, perhaps because thread 1 > hasn't completed its insert yet? For example SELECT * WHERE > seqnumber< 3; would return only a row with seqnumber=2? It is never a good idea to rely on the numeric ordering of a generated PK column. If you really need to know in which orderrows were inserted you should use a timestamp that is recording that time (although I believe the resolution of a timestampcolumn might be not fine enough..) Regards Thomas
В списке pgsql-novice по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера