Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 7E4FD9FA31B for ; Tue, 22 May 2007 09:23:40 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 69545-06 for ; Tue, 22 May 2007 09:23:34 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from floppy.pyrenet.fr (floppy.pyrenet.fr [194.116.145.2]) by postgresql.org (Postfix) with ESMTP id D3D549FA1A8 for ; Tue, 22 May 2007 09:23:39 -0300 (ADT) Received: by floppy.pyrenet.fr (Postfix, from userid 106) id 45C033090A; Tue, 22 May 2007 14:23:38 +0200 (MET DST) From: "Sabin Coanda" X-Newsgroups: pgsql.sql Subject: Re: system table storing sequence attributes Date: Tue, 22 May 2007 15:23:44 +0300 Organization: Hub.Org Networking Services Lines: 10 Message-ID: References: X-Complaints-To: usenet@news.hub.org X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-RFC2646: Format=Flowed; Original To: pgsql-sql@postgresql.org X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200705/152 X-Sequence-Number: 28432 ... > select last_value from sequence_name Unfortunately there is the same problem. The documentation say: "It is an error to call lastval if nextval has not yet been called in the current session." .... and I don't want to call nextval before. Sabin