pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Pierre Couderc <pierre@couderc.cc>
To: pgsql-admin@postgresql.org
Subject: Re: How to read a sequence without incrementing it?
Date: Sat, 30 Aug 2003 08:11:10 +0200
Message-ID: <bipf5s$2p3m$1@news.hub.org> (raw)
In-Reply-To: <binuss$2oe2$1@news.hub.org>
References: <binuss$2oe2$1@news.hub.org>

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
> 




view thread (6+ messages)  latest in thread

Message-ID: <bipf5s$2p3m$1@news.hub.org>
Permalink:  ../bipf5s$2p3m$1@news.hub.org/
Also on:    postgresql.org/message-id/bipf5s$2p3m$1@news.hub.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: pierre@couderc.cc
  Subject: Re: How to read a sequence without incrementing it?
  In-Reply-To: <bipf5s$2p3m$1@news.hub.org>
  References: <binuss$2oe2$1@news.hub.org> <bipf5s$2p3m$1@news.hub.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox