Received: from localhost (unknown [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 21A712E30ED for ; Tue, 22 Jan 2008 03:54:22 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 62547-01 for ; Tue, 22 Jan 2008 03:54:19 -0400 (AST) Received: from office.antora.ru (unknown [195.151.214.69]) by postgresql.org (Postfix) with ESMTP id 2BA9D2E3017 for ; Tue, 22 Jan 2008 03:54:19 -0400 (AST) Received: from [192.168.1.124] by office.antora.ru with esmtpa (Exim 4.63) (envelope-from ) id 1JHDxW-0002no-SI for pgsql-sql@postgresql.org; Tue, 22 Jan 2008 10:54:14 +0300 Message-ID: <4795A152.3080400@bankir.ru> Date: Tue, 22 Jan 2008 10:54:58 +0300 From: sad User-Agent: Thunderbird 2.0.0.4 (X11/20070626) MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: Re: currval() within one statement References: <4795984E.7030904@bankir.ru> <20080122073637.GB21676@a-kretschmer.de> In-Reply-To: <20080122073637.GB21676@a-kretschmer.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.604 tagged_above=0 required=5 tests=AWL=0.689, BAYES_40=-0.185, RDNS_NONE=0.1 X-Spam-Level: X-Archive-Number: 200801/164 X-Sequence-Number: 30017 A. Kretschmer wrote: >> is it expected that the currval() changes its value between calls within >> one statement ? > Conclusion, don't call nextval() within a TRIGGER, and insert either > nextval() for the column or omit this column. I only note that i still want to discuss the titled problem or to be given an exact pointer to documentation regarding the currval() behavior in the described situation, that i had.