From: | Sam Barnett-Cormack <s(dot)barnett-cormack(at)lancaster(dot)ac(dot)uk> |
---|---|
To: | Pierre Couderc <pierre(at)couderc(dot)cc> |
Cc: | pgsql-admin(at)postgresql(dot)org |
Subject: | Re: How to read a sequence without incrementing it? |
Date: | 2003-08-29 20:15:00 |
Message-ID: | Pine.LNX.4.50.0308292113250.21325-100000@short.lancs.ac.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Nick Fankhauser | 2003-08-29 20:20:52 | Re: How to read a sequence without incrementing it? |
Previous Message | Pierre Couderc | 2003-08-29 16:27:09 | How to read a sequence without incrementing it? |