pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nick Fankhauser <nickf@ontko.com>
To: Pierre Couderc <pierre@couderc.cc>
To: pgsql-admin@postgresql.org
Subject: Re: How to read a sequence without incrementing it?
Date: Fri, 29 Aug 2003 15:20:52 -0500
Message-ID: <NEBBLAAHGLEEPCGOBHDGIEEBICAA.nickf@ontko.com> (raw)
In-Reply-To: <binuss$2oe2$1@news.hub.org>


Use currval(<sequence name>)

See:

http://www.postgresql.org/docs/7.3/static/functions-sequence.html

-Nick

> -----Original Message-----
> From: pgsql-admin-owner@postgresql.org
> [mailto:pgsql-admin-owner@postgresql.org]On Behalf Of Pierre Couderc
> Sent: Friday, August 29, 2003 11:27 AM
> To: pgsql-admin@postgresql.org
> Subject: [ADMIN] How to read a sequence without incrementing it?
> 
> 
> 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
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
> 




view thread (6+ messages)  latest in thread

Message-ID: <NEBBLAAHGLEEPCGOBHDGIEEBICAA.nickf@ontko.com>
Permalink:  ../NEBBLAAHGLEEPCGOBHDGIEEBICAA.nickf@ontko.com/
Also on:    postgresql.org/message-id/NEBBLAAHGLEEPCGOBHDGIEEBICAA.nickf@ontko.com

 · 

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: nickf@ontko.com, pierre@couderc.cc
  Subject: Re: How to read a sequence without incrementing it?
  In-Reply-To: <NEBBLAAHGLEEPCGOBHDGIEEBICAA.nickf@ontko.com>
  References: <binuss$2oe2$1@news.hub.org> <NEBBLAAHGLEEPCGOBHDGIEEBICAA.nickf@ontko.com>

* 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