Re: Using oids

Поиск
Список
Период
Сортировка
От Doug McNaught
Тема Re: Using oids
Дата
Msg-id m3ekyx7t2b.fsf@varsoon.wireboard.com
обсуждение исходный текст
Ответ на Re: Using oids  ("Shridhar Daithankar" <shridhar_daithankar@persistent.co.in>)
Список pgsql-general
Dennis Gearon <gearond@fireserve.net> writes:

> Oliver Elphick wrote:
>
> >You cannot use currval() until you have used nextval() on the same
> >sequence in the same session.

> Why is that, anyway, and why should it be?

Because that's what currval() does.  It doesn't have anything to do
with sequence values in other sessions.  It gives you the last value
*you* got for thee sequence, so if you haven't called nextval() yet
you should and do get an error.

Maybe it should have been called lastval(), but that could be a bit
misleading too...

-Doug

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

Предыдущее
От: psql-mail@freeuk.com
Дата:
Сообщение: postmaster crashing
Следующее
От: Tom Lane
Дата:
Сообщение: Re: pg_dump incorrect sequence value