Re: question about visibilty while updating multiple rows .

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Rajesh Kumar Mallah <mallah(at)trade-india(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: question about visibilty while updating multiple rows .
Date: 2003-04-09 15:12:48
Message-ID: 7045.1049901168@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tomasz Myrta 2003-04-09 15:17:48 Re: Concatenating not working properly
Previous Message Michal Taborsky 2003-04-09 14:54:50 Concatenating not working properly