Re: [GENERAL] getting the currval of a sequence

Поиск
Список
Период
Сортировка
От James Olin Oden
Тема Re: [GENERAL] getting the currval of a sequence
Дата
Msg-id 81Aug13.093651edt.35713@gateway.lee.k12.nc.us
обсуждение исходный текст
Ответ на RE: [GENERAL] getting the currval of a sequence  ("Jackson, DeJuan" <djackson@cpsgroup.com>)
Список pgsql-general


> I think you should just go with what Vadim suggested and use:
>         select currval('my_sequence');
> This will be the same within a transaction, even if there is another
> transaction using the same sequence.

Sorry, I wasn't thinking of it happening in the same transaction.  In that
case that would be the thing to do.  If on the other hand you needed that
number over multiple transactions, wouldn't what I had suggested work?

...james

>




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

Предыдущее
От: "Jackson, DeJuan"
Дата:
Сообщение: RE: [GENERAL] getting the currval of a sequence
Следующее
От: "Jackson, DeJuan"
Дата:
Сообщение: RE: [GENERAL] getting the currval of a sequence