Re: Problem with FOR UPDATE - Mailing list pgsql-sql

From Tom Lane
Subject Re: Problem with FOR UPDATE
Date
Msg-id 5031.1157638539@sss.pgh.pa.us
Whole thread Raw
In response to Problem with FOR UPDATE  (Kaloyan Iliev <news1@faith.digsys.bg>)
Responses Thanks
List pgsql-sql
Kaloyan Iliev <news1@faith.digsys.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


pgsql-sql by date:

Previous
From: Emi Lu
Date:
Subject: Re: Is it possible to left join based on previous joins result
Next
From: Stephan Szabo
Date:
Subject: Re: Problem with FOR UPDATE