X-Original-To: pgsql-sql-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id C88649FA2A1 for ; Thu, 7 Sep 2006 11:16:05 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 61422-04 for ; Thu, 7 Sep 2006 11:15:49 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 187E99F9F0E for ; Thu, 7 Sep 2006 11:15:43 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id k87EFdgk005032; Thu, 7 Sep 2006 10:15:39 -0400 (EDT) To: Kaloyan Iliev cc: pgsql-sql@postgresql.org Subject: Re: Problem with FOR UPDATE In-reply-to: <44FFDFA6.4080600@faith.digsys.bg> References: <44FFDFA6.4080600@faith.digsys.bg> Comments: In-reply-to Kaloyan Iliev message dated "Thu, 07 Sep 2006 12:00:22 +0300" Date: Thu, 07 Sep 2006 10:15:39 -0400 Message-ID: <5031.1157638539@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.114 tagged_above=0 required=5 tests=AWL, SPF_HELO_PASS, SPF_PASS, UPPERCASE_25_50 X-Spam-Level: X-Archive-Number: 200609/50 X-Sequence-Number: 26261 Kaloyan Iliev writes: > rsr=# SELECT > ... > rsr-# FROM debts_desc DD LEFT JOIN config > C ON (DD.conf_id = C.id), > ... > rsr-# FOR UPDATE OF > debts_desc; > ERROR: relation "debts_desc" in FOR UPDATE/SHARE clause not found in > FROM clause Use the alias, ie, DD. Remember that an alias hides the real name of that table for all purposes in the current query. regards, tom lane