Re: Reference to parent query from ANY sublink
| От | Antonin Houska |
|---|---|
| Тема | Re: Reference to parent query from ANY sublink |
| Дата | |
| Msg-id | 5272BF7A.2000206@gmail.com обсуждение исходный текст |
| Ответ на | Reference to parent query from ANY sublink (Antonin Houska <antonin.houska@gmail.com>) |
| Ответы |
Re: Reference to parent query from ANY sublink
|
| Список | pgsql-hackers |
On 10/31/2013 03:46 PM, Antonin Houska wrote: > Can the change be as simple as this or do I neglect anything? Well, the example of outer join is wrong. Instead I think query SELECT * FROM tab1 aLEFT JOINtab1 bON b.i = ANY ( SELECT tab2.k FROM tab2 WHERE k = a.j); should be converted to SELECT * FROM tab1 aLEFT JOIN( tab1 b LATERAL SEMI JOIN ( SELECT tab2.k FROM tab2 WHERE k = a.j ) AS ANY_subquery ON b.i = sub.k) I'm not sure if it's legal for the WHERE clause to reference LHS of the original outer join (a.j). Some more restriction may be needed. I need to think about it a bit more. // Tony
В списке pgsql-hackers по дате отправления: