currval question

Поиск
Список
Период
Сортировка
От Andy Kriger
Тема currval question
Дата
Msg-id OJEFIHHAALOBKKJEOMBDAEAGCAAA.akriger@greaterthanone.com
обсуждение исходный текст
Ответы Re: currval question  (Tino Wildenhain <tino@wildenhain.de>)
Re: currval question  (Garo Hussenjian <garo@xapnet.com>)
Re: currval question  (Jason Earl <jason.earl@simplot.com>)
Re: currval question  ("Andy Kriger" <akriger@greaterthanone.com>)
Список pgsql-general
I am trying to get the last value updated by an column auto-incrementing
with nextval(). In MySQL, you'd use LAST_INSERT_ID() - in Postgre, currval()
appears to do the trick.

Is this maintained on a per-connection basis? For example, user A inserts
and the nextval() updates to 5, user B does 2 inserts, updating nextval() to
7. When user A calls currval() they should get 5 if the updates are per-cnx.
What does psql do under the hood here?

thx
a



В списке pgsql-general по дате отправления:

Предыдущее
От: Cindy
Дата:
Сообщение: Re: question regarding regular expressions
Следующее
От: Tino Wildenhain
Дата:
Сообщение: Re: question regarding regular expressions