Re: How to read a sequence without incrementing it?

From: Pierre Couderc <pierre(at)couderc(dot)cc>
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: How to read a sequence without incrementing it?
Date: 2003-08-30 06:11:10
Message-ID: bipf5s$2p3m$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Thank you all.

SELECT last_value FROM my_sequence;

is the good solution.

(Currval() does not work as there is no nextval() before in the session)

Pierre Couderc

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)?
>
> Thank you all
>
> Pierre Couderc
>

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Marc G. Fournier 2003-08-30 19:40:07 Re: eRserver
Previous Message Bruce Momjian 2003-08-30 04:56:43 Re: logfile problem?