| От | nolan@celery.tssi.com |
|---|---|
| Тема | Re: last inserted raw (identity) |
| Дата | |
| Msg-id | 20030802041830.8134.qmail@celery.tssi.com обсуждение |
| Ответ на | Re: last inserted raw (identity) (Ron Johnson <ron.l.johnson@cox.net>) |
| Ответы |
Re: last inserted raw (identity)
|
| Список | pgsql-general |
> > See currval() and nextval(). > > What if his PK isn't a sequence? Moreover, currval() and nextval() won't guarantee that you always get the most recently inserted sequence value, either, because each connection can have a cache of sequence values to assign from. While the backend guarantees that each sequence value will be UNIQUE there is no guarantee that MY currval() or nextval() is actually based on the last sequence value that ANYONE used. In short, I think the answer to the original question is that there is no reliable way to find out what the last record inserted was. -- Mike Nolan
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера