| От | cedric |
|---|---|
| Тема | Re: Retrieving PK of inserted row |
| Дата | |
| Msg-id | 200701301230.05767.cedric@over-blog.com обсуждение |
| Ответ на | Retrieving PK of inserted row ("woger151" <woger151@jqpx37.cotse.net>) |
| Список | pgsql-general |
Le mardi 30 janvier 2007 12:19, woger151 a écrit : > (3) Use LASTVAL for this one : look at http://people.planetpostgresql.org/xzilla/index.php?/archives/169-Is-lastval-evil.html > > My questions: > * Are any of these methods flawed? > * Is there any reason to prefer (1) to (2)? > * I'm not sure whether LASTVAL is guaranteed to work outside of a > transaction. Its description in the 8.1 manual starts with "Return the > value most recently returned by nextval in the current session. ..." but > I'm not sure of the formal sense in which "session" is being used. (I'm > connecting to the DB from mod_php in apache, so I guess "session" could > mean "during the existence of a given db connection," but I'm not sure.)
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера