From: Tom Lane <tgl@sss.pgh.pa.us>
To: Rajesh Kumar Mallah <mallah@trade-india.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: question about visibilty while updating multiple rows .
Date: Wed, 09 Apr 2003 11:12:48 -0400
Message-ID: <7045.1049901168@sss.pgh.pa.us> (raw)
In-Reply-To: <200304091247.59378.mallah@trade-india.com>
References: <200304091247.59378.mallah@trade-india.com>
> 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, mallah@trade-india.com
Subject: Re: question about visibilty while updating multiple rows .
In-Reply-To: <7045.1049901168@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox