Re: summing tables - Mailing list pgsql-sql

From Tom Lane
Subject Re: summing tables
Date
Msg-id 22931.1058283723@sss.pgh.pa.us
Whole thread Raw
In response to Re: summing tables  ("Viorel Dragomir" <bigchief@vio.ro>)
List pgsql-sql
"Viorel Dragomir" <bigchief@vio.ro> 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


pgsql-sql by date:

Previous
From: greg@turnstep.com
Date:
Subject: Re: Count dates distinct within an interval
Next
From: "Viorel Dragomir"
Date:
Subject: Re: summing tables