X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.225.181]) by svr1.postgresql.org (Postfix) with ESMTP id E8733CC3F1 for ; Tue, 15 Jul 2003 15:41:45 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (svr5.postgresql.org [64.117.225.181]) (amavisd-new, port 10024) with ESMTP id 40333-03 for ; Tue, 15 Jul 2003 15:42:04 +0000 (GMT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id 90B5FCC3D3 for ; Tue, 15 Jul 2003 12:41:34 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.9/8.12.9) with ESMTP id h6FFg3Q3022932; Tue, 15 Jul 2003 11:42:03 -0400 (EDT) To: "Viorel Dragomir" Cc: pgsql-sql@postgresql.org Subject: Re: summing tables In-reply-to: <012b01c34ae6$40ab0870$0600a8c0@fix.ro> References: <20030715140921.7c5a6a6c.erik@thiele-hydraulik.de> <001501c34aca$e70ca280$0600a8c0@fix.ro> <20030715143925.54716ed4.erik@thiele-hydraulik.de> <22671.1058282096@sss.pgh.pa.us> <012b01c34ae6$40ab0870$0600a8c0@fix.ro> Comments: In-reply-to "Viorel Dragomir" message dated "Tue, 15 Jul 2003 18:32:07 +0300" Date: Tue, 15 Jul 2003 11:42:03 -0400 Message-ID: <22931.1058283723@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200307/186 X-Sequence-Number: 14300 "Viorel Dragomir" writes: > Indeed it was a mistake not to put the table_name. in where clause. > But this doesn't resolve the problem. > Do you know in which order the update will modify the rows? No, and *it does not matter*. You are forgetting that this all runs under MVCC rules. The sub-SELECTs will see the pre-existing versions of the rows, whether or not the UPDATE has yet produced new versions. regards, tom lane