strange update behavior
От | Volkmar Herbst GCI |
---|---|
Тема | strange update behavior |
Дата | |
Msg-id | 006b01cbfa15$41ec1800$c5c44800$@de обсуждение исходный текст |
Список | pgsql-sql |
<div class="WordSection1"><p class="MsoNormal"> <p class="MsoNormal"><span lang="EN-US">I did encounter a quite strange behaviorduring update which I did not understand:</span><p class="MsoNormal"><span lang="EN-US"> </span><p class="MsoNormal"><spanlang="EN-US">The following query updated table parcelle with only one entry for all rows:</span><pclass="MsoNormal"><span lang="FR">update cadastre.parcelle </span><p class="MsoNormal" style="text-indent:35.4pt"><spanlang="FR">set code_unique = t2.code_unique from </span><p class="MsoNormal" style="margin-left:35.4pt;text-indent:35.4pt"><spanlang="FR">cadastre.parcelle t1, cadastre.propriete t2 </span><p class="MsoNormal"style="margin-left:35.4pt;text-indent:35.4pt"><span lang="FR">where t1.uoid = t2.uoidparcelle;</span><pclass="MsoNormal"><span lang="FR"> </span><p class="MsoNormal"><span lang="EN-US">the next updatequery behaved as expected :</span><p class="MsoNormal"><span lang="FR">update cadastre.parcelle </span><p class="MsoNormal"style="text-indent:35.4pt"><span lang="FR">set code_unique = t2.code_unique from </span><p class="MsoNormal"style="margin-left:35.4pt;text-indent:35.4pt"><span lang="FR">cadastre.parcelle t1, cadastre.propriete t2</span><p class="MsoNormal" style="margin-left:35.4pt;text-indent:35.4pt"><span lang="FR">where parcelle.uoid = t2.uoidparcelle;</span><pclass="MsoNormal"><span lang="FR"> </span><p class="MsoNormal"><span lang="EN-US">Why do i haveto reference table parcelle in the where clause?</span><p class="MsoNormal"><span lang="EN-US"> </span></div>
В списке pgsql-sql по дате отправления: