Re: getting currval from a sequence - BUG ?

Поиск
Список
Период
Сортировка
От Doug McNaught
Тема Re: getting currval from a sequence - BUG ?
Дата
Msg-id m3it94x726.fsf@varsoon.denali.to
обсуждение исходный текст
Ответ на getting currval from a sequence  (tony <tony@animaproductions.com>)
Список pgsql-general
Jan Poslusny <pajout@gingerall.cz> writes:

> Hi,
> select currval('sequence_name');
> with quotes should help you. But my pg 7.1.2 throws error
> "sequence_name.currval is not yet defined in this session" (possibly
> bug ?). If I use sequence before calling this (for instance "insert
> into mytable values(nextval('sequence_name'));" ), all is OK.

This is documented behavior.  See the FAQ and the docs.

-Doug
--
Let us cross over the river, and rest under the shade of the trees.
   --T. J. Jackson, 1863

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: initdb - segmentation fault
Следующее
От: jtp
Дата:
Сообщение: compiling on sco