Re: question about visibilty while updating multiple rows .

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

On Wednesday 09 Apr 2003 8:42 pm, Tom Lane wrote:
> > 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.

Thanks for the explanation and suggestion Tom,
I did it however by using intermediate tables and distinct on().

Regds
Mallah.

>
> regards, tom lane
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly

--
Rajesh Kumar Mallah,
Project Manager (Development)
Infocom Network Limited, New Delhi
phone: +91(11)6152172 (221) (L) ,9811255597 (M)

Visit http://www.trade-india.com ,
India's Leading B2B eMarketplace.

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Ries van Twisk 2003-04-10 06:36:02 The need to know if a field is using/connected to a sequence
Previous Message dnaren 2003-04-10 03:15:10 unsubscrube