Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 2C8B79FB578 for ; Tue, 22 May 2007 09:42:08 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 78885-02 for ; Tue, 22 May 2007 09:41:58 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by postgresql.org (Postfix) with ESMTP id C7E1A9FB466 for ; Tue, 22 May 2007 09:42:03 -0300 (ADT) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1HqTgT-0003KW-C8 for pgsql-sql@postgresql.org; Tue, 22 May 2007 14:41:49 +0200 Received: from pc035-72.amg.gda.pl ([153.19.72.35]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 22 May 2007 14:41:49 +0200 Received: from mstepnicki by pc035-72.amg.gda.pl with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 22 May 2007 14:41:49 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-sql@postgresql.org From: =?iso-8859-2?q?Marcin_St=EApnicki?= Subject: Re: system table storing sequence attributes Date: Tue, 22 May 2007 14:41:38 +0200 Organization: Linux.PL Lines: 20 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-2 Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: pc035-72.amg.gda.pl User-Agent: Pan/0.14.2.91 (As She Crawled Across the Table (Debian GNU/Linux)) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200705/154 X-Sequence-Number: 28434 Dnia Tue, 22 May 2007 15:23:44 +0300, Sabin Coanda napisał(a): > ... >> 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. I think that you either misunderstood this statement or try to break your application in a nasty way ;). Please tell us more about your problem and/or what do you want to achive, because sequences behave this way for a reason (concurrency issues). Perhaps there is another solution. -- | And Do What You Will be the challenge | http://apcoln.linuxpl.org | So be it in love that harms none | http://biznes.linux.pl | For this is the only commandment. | http://www.juanperon.info `---* JID: Aragorn_Vime@jabber.org *---' http://www.naszedzieci.org