X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 526E2D1BA9D for ; Sat, 30 Aug 2003 06:22:55 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 09364-03 for ; Sat, 30 Aug 2003 03:22:44 -0300 (ADT) Received: from news.hub.org (unknown [64.117.224.194]) by svr1.postgresql.org (Postfix) with ESMTP id DC228D1BA98 for ; Sat, 30 Aug 2003 03:22:42 -0300 (ADT) Received: from news.hub.org (host-64-117-224-194.altec1.com [64.117.224.194] (may be forged)) by news.hub.org (8.12.9/8.12.9) with ESMTP id h7U6Mgem093237 for ; Sat, 30 Aug 2003 06:22:42 GMT (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.12.9/8.12.9/Submit) id h7U6B9qJ091903 for pgsql-admin@postgresql.org; Sat, 30 Aug 2003 06:11:09 GMT From: Pierre Couderc X-Newsgroups: comp.databases.postgresql.admin Subject: Re: How to read a sequence without incrementing it? Date: Sat, 30 Aug 2003 08:11:10 +0200 Organization: Hub.Org Networking Services Lines: 23 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@news.hub.org User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3) Gecko/20030312 X-Accept-Language: en-us, en, fr In-Reply-To: To: pgsql-admin@postgresql.org X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200308/363 X-Sequence-Number: 10083 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 >