Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id E6A374763A3 for ; Tue, 3 Sep 2002 17:31:28 -0400 (EDT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id CFEB34760DF for ; Tue, 3 Sep 2002 17:31:27 -0400 (EDT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.5/8.12.5) with ESMTP id g83LVKZM018072; Tue, 3 Sep 2002 17:31:20 -0400 (EDT) To: "alexandre :: aldeia digital" Cc: pgsql-sql@postgresql.org Subject: Re: Outer Join with For Update In-reply-to: <1507.200.225.214.1.1031076341.squirrel@webmail.aldeiadigital.com.br> References: <1507.200.225.214.1.1031076341.squirrel@webmail.aldeiadigital.com.br> Comments: In-reply-to "alexandre :: aldeia digital" message dated "Tue, 03 Sep 2002 15:05:41 -0300" Date: Tue, 03 Sep 2002 17:31:19 -0400 Message-ID: <18071.1031088679@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200209/18 X-Sequence-Number: 9295 "alexandre :: aldeia digital" 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