Re: Problem with FOR UPDATE

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Kaloyan Iliev <news1(at)faith(dot)digsys(dot)bg>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Problem with FOR UPDATE
Date: 2006-09-07 14:15:39
Message-ID: 5031.1157638539@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Kaloyan Iliev <news1(at)faith(dot)digsys(dot)bg> 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

In response to

Responses

  • Thanks at 2006-09-07 15:29:50 from Kaloyan Iliev

Browse pgsql-sql by date

  From Date Subject
Next Message Stephan Szabo 2006-09-07 14:20:27 Re: Problem with FOR UPDATE
Previous Message Emi Lu 2006-09-07 14:02:49 Re: Is it possible to left join based on previous joins result