Re: question about visibilty while updating multiple rows . - Mailing list pgsql-sql

From Tom Lane
Subject Re: question about visibilty while updating multiple rows .
Date
Msg-id 7045.1049901168@sss.pgh.pa.us
Whole thread Raw
In response to question about visibilty while updating multiple rows .  (Rajesh Kumar Mallah <mallah@trade-india.com>)
Responses Re: question about visibilty while updating multiple rows .  (Rajesh Kumar Mallah <mallah@trade-india.com>)
List pgsql-sql
> If an update statement is affecting multiple rows of a table X ,
> Does a subselect (selecting from X only)  inside EXISTS part of outer query 
> able to see the changes when rows are being updated one by one by outer query?

No, because it's part of the same query.

I believe though that a user-defined function called from the update
query would see the changes made so far.  So possibly you can fix your
problem by pushing the EXISTS down into a SQL or plpgsql function.
        regards, tom lane



pgsql-sql by date:

Previous
From: Michal Taborsky
Date:
Subject: Concatenating not working properly
Next
From: Tomasz Myrta
Date:
Subject: Re: Concatenating not working properly