Getting the current value of a sequence

Поиск
Список
Период
Сортировка
От JORGE MALDONADO
Тема Getting the current value of a sequence
Дата
Msg-id CAAY=A7-QbOXAOvRPQdpSndXe+aJ+d+h4+zsmP1q7L4P1JrF=rA@mail.gmail.com
обсуждение исходный текст
Ответы Re: Getting the current value of a sequence  (hubert depesz lubaczewski <depesz@depesz.com>)
Re: Getting the current value of a sequence  (Roxanne Reid-Bennett <rox@tara-lu.com>)
Re: Getting the current value of a sequence  (amulsul <sul_amul@yahoo.co.in>)
Список pgsql-novice
I have been trying to get the current value of a sequence without success. I have read that "currval" does the job but I do not know how to use it. This is what I have tried and I get an error saying that "currval of sequence 'name_of_sequence' is not defined for the session.

SELECT currval('name_of_sequence')

I will very much appreciate your feedback.

Respectfully,
Jorge Maldonado

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

Предыдущее
От: amul sul
Дата:
Сообщение: Re: How to disable auto-commit in postgresql-9.4
Следующее
От: hubert depesz lubaczewski
Дата:
Сообщение: Re: Getting the current value of a sequence