Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id CA9E01337B80 for ; Wed, 13 Apr 2011 17:06:23 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 51331-08 for ; Wed, 13 Apr 2011 20:06:06 +0000 (UTC) X-Greylist: delayed 00:06:52.219237 by SQLgrey-1.7.6 Received: from mout2.freenet.de (mout2.freenet.de [195.4.92.92]) by mail.postgresql.org (Postfix) with ESMTP id 3251D1337B68 for ; Wed, 13 Apr 2011 17:06:06 -0300 (ADT) Received: from [195.4.92.28] (helo=18.mx.freenet.de) by mout2.freenet.de with esmtpa (ID herbst@gc-i.de) (port 25) (Exim 4.72 #5) id 1QA6DX-0006Yc-1T for pgsql-sql@postgresql.org; Wed, 13 Apr 2011 21:59:11 +0200 Received: from [41.221.187.179] (port=11533 helo=VHerbstNB) by 18.mx.freenet.de with esmtpa (ID herbst@gc-i.de) (port 587) (Exim 4.72 #3) id 1QA6DV-0003Ea-BV for pgsql-sql@postgresql.org; Wed, 13 Apr 2011 21:59:10 +0200 From: "Volkmar Herbst GCI" To: Subject: strange update behavior Date: Wed, 13 Apr 2011 21:59:01 +0200 Message-ID: <006b01cbfa15$41ec1800$c5c44800$@de> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_006C_01CBFA26.0574E800" X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: Acv6FTo4nqLq4JOFQs2N2u8QOzFq4A== Content-Language: de X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.801 tagged_above=-5 required=5 tests=BAYES_50=0.8, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201104/16 X-Sequence-Number: 35263 This is a multi-part message in MIME format. ------=_NextPart_000_006C_01CBFA26.0574E800 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit I did encounter a quite strange behavior during update which I did not understand: The following query updated table parcelle with only one entry for all rows: update cadastre.parcelle set code_unique = t2.code_unique from cadastre.parcelle t1, cadastre.propriete t2 where t1.uoid = t2.uoidparcelle; the next update query behaved as expected : update cadastre.parcelle set code_unique = t2.code_unique from cadastre.parcelle t1, cadastre.propriete t2 where parcelle.uoid = t2.uoidparcelle; Why do i have to reference table parcelle in the where clause? ------=_NextPart_000_006C_01CBFA26.0574E800 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

 

I did encounter a quite strange behavior during update = which I did not understand:

 

The following query updated table = parcelle with only one entry for all rows:

update cadastre.parcelle =

set code_unique =3D = t2.code_unique  from 

cadastre.parcelle t1, cadastre.propriete t2 =

where = t1.uoid =3D t2.uoidparcelle;

 

the next update query behaved as = expected :

update cadastre.parcelle

set = code_unique =3D t2.code_unique  from 

cadastre.parcelle t1, cadastre.propriete t2 =

where = parcelle.uoid =3D t2.uoidparcelle;

 

Why do i have to reference table = parcelle in the where clause?

 

------=_NextPart_000_006C_01CBFA26.0574E800--