| От | Stephan Szabo |
|---|---|
| Тема | Re: Ref to last INSERT on a table without OIDs? |
| Дата | |
| Msg-id | 20030128081334.Q93245-100000@megazone23.bigpanda.com обсуждение |
| Ответ на | Ref to last INSERT on a table without OIDs? ("Mark Cave-Ayland" <mark.cave-ayland@webbased.co.uk>) |
| Список | pgsql-general |
On Tue, 28 Jan 2003, Mark Cave-Ayland wrote: > Hi there, > > Hopefully just a quick one: how is it possible to obtain a reference to > the last inserted record in a table which is created without oids? I > would like to dump/restore some of our larger tables so they don't use > oids, however I am concerned that simply getting the current PK sequence > value after insertion within a transaction is not safe when many people > are accessing the table/sequence at once? Can anyone clarify this? We're > using the latest and greatest 7.3.1. If you use currval() to get the sequence value it'll be the last value given to your session so you don't have to worry about other sessions modifying the sequence.
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера