X-Original-To: pgsql-bugs-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 2CA67D1BA52 for ; Tue, 24 Feb 2004 06:52:04 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 05137-07 for ; Tue, 24 Feb 2004 02:51:59 -0400 (AST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id 33303D1BA35 for ; Tue, 24 Feb 2004 02:51:58 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.11/8.12.11) with ESMTP id i1O6ptH8018921; Tue, 24 Feb 2004 01:51:56 -0500 (EST) To: "Martin Langhoff (Catalyst IT)" Cc: PostgreSQL Bugs List Subject: Re: BUG #1083: Insert query reordering interacts badly with NEXTVAL()/CURRVAL() In-reply-to: <403AF354.5030901@catalyst.net.nz> References: <20040224012657.B86E5CF4A21@www.postgresql.com> <18400.1077601067@sss.pgh.pa.us> <403AF354.5030901@catalyst.net.nz> Comments: In-reply-to "Martin Langhoff (Catalyst IT)" message dated "Tue, 24 Feb 2004 19:46:44 +1300" Date: Tue, 24 Feb 2004 01:51:55 -0500 Message-ID: <18920.1077605515@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200402/119 X-Sequence-Number: 7907 "Martin Langhoff (Catalyst IT)" writes: > Thanks for the clarification. I am curious, however: I can't find a > means to achieve the same effect in a deterministic manner. Any pointers? How about SELECT nextval('seq'); -- ignore result INSERT INTO ... VALUES (currval('seq'), currval('seq')); regards, tom lane