Re: How to read a sequence without incrementing it?

Поиск
Список
Период
Сортировка
От Sam Barnett-Cormack
Тема Re: How to read a sequence without incrementing it?
Дата
Msg-id Pine.LNX.4.50.0308292113250.21325-100000@short.lancs.ac.uk
обсуждение исходный текст
Ответ на How to read a sequence without incrementing it?  (Pierre Couderc <pierre@couderc.cc>)
Список pgsql-admin
On Fri, 29 Aug 2003, Pierre Couderc wrote:

> I would like to read the current value of a sequence, or a value not too far of
> the current value (for example, the value it was a few seconds or minutes ago).
> Is it possible (without any nexrval that should increment it)?

SELECT last_value FROM my_sequence;

where my_sequence is the sequence name.

try:

\d my_sequence; (same substitution as before)

for more info.

--

Sam Barnett-Cormack
Software Developer                           |  Student of Physics & Maths
UK Mirror Service (http://www.mirror.ac.uk)  |  Lancaster University

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

Предыдущее
От: Pierre Couderc
Дата:
Сообщение: How to read a sequence without incrementing it?
Следующее
От: "Nick Fankhauser"
Дата:
Сообщение: Re: How to read a sequence without incrementing it?