Re: Outer Join with For Update - Mailing list pgsql-sql

From Tom Lane
Subject Re: Outer Join with For Update
Date
Msg-id 18071.1031088679@sss.pgh.pa.us
Whole thread Raw
In response to Outer Join with For Update  ("alexandre :: aldeia digital" <alepaes@aldeiadigital.com.br>)
List pgsql-sql
"alexandre :: aldeia digital" <alepaes@aldeiadigital.com.br> writes:
> SELECT A.id, B.desc from A left join B ON B.id=A.id FOR UPDATE OF A,B
> If I have a null rellation in B, the error in postgres is:
> "SELECT FOR UPDATE cannot be applied to the nullable side of an OUTER JOIN"

Yup.

> DB2 simply ignore the FOR UPDATE ...
> I think that is the correct form...

That seems obviously wrong to me.  What good is a FOR UPDATE if it fails
to lock down the rows that created your result?
        regards, tom lane


pgsql-sql by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Update Help
Next
From:
Date:
Subject: Re: tree structures in sql - my point of view (with request