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 E97E0D1B989 for ; Tue, 24 Feb 2004 06:46:52 +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 02546-08 for ; Tue, 24 Feb 2004 02:46:51 -0400 (AST) Received: from mail2.catalyst.net.nz (godel.catalyst.net.nz [202.49.159.12]) by svr1.postgresql.org (Postfix) with ESMTP id 4AC78D1B903 for ; Tue, 24 Feb 2004 02:46:50 -0400 (AST) Received: from leibniz.catalyst.net.nz ([202.49.159.7] helo=catalyst.net.nz) by mail2.catalyst.net.nz with esmtp (Exim 3.35 #1 (Debian)) id 1AvWL6-00035m-02; Tue, 24 Feb 2004 19:46:44 +1300 Message-ID: <403AF354.5030901@catalyst.net.nz> Date: Tue, 24 Feb 2004 19:46:44 +1300 From: "Martin Langhoff (Catalyst IT)" User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6b) Gecko/20031210 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Tom Lane Cc: PostgreSQL Bugs List Subject: Re: BUG #1083: Insert query reordering interacts badly with References: <20040224012657.B86E5CF4A21@www.postgresql.com> <18400.1077601067@sss.pgh.pa.us> In-Reply-To: <18400.1077601067@sss.pgh.pa.us> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-System-Filter-Id: mail2.catalyst.net.nz 1AvWL6-00035m-02 X-Virus-Scanned-By: Amavis with CLAM Anti Virus on mail2.catalyst.net.nz X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200402/142 X-Sequence-Number: 7930 Tom Lane wrote: >"PostgreSQL Bugs List" writes: > > >>/* this statement will reverse the order of CURRVAL()/NEXTVAL() to match the >>column order of the table */ >>INSERT INTO testing (col_b, col_a) VALUES (NEXTVAL('seq'), CURRVAL('seq')); >> >> > >This is not a bug. The order of evaluation of select-lists and >values-lists is not defined anywhere in the SQL standard, nor promised >anywhere in the Postgres documentation. > 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? regards, martin -- ----------------------------------------------------------------------- Martin @ Catalyst .Net .NZ Ltd, PO Box 11-053, Manners St, Wellington WEB: http://catalyst.net.nz/ PHYS: Level 2, 150-154 Willis St OFFICE: +64(4)916-7224 MOB: +64(21)364-017 Make things as simple as possible, but no simpler - Einstein -----------------------------------------------------------------------