Re: Is it possible to left join based on previous joins result
В списке pgsql-sql по дате отправления:
| От | Stephan Szabo |
|---|---|
| Тема | Re: Is it possible to left join based on previous joins result |
| Дата | |
| Msg-id | 20060907072131.J60412@megazone.bigpanda.com обсуждение |
| Ответ на | Is it possible to left join based on previous joins result (Emi Lu <emilu@encs.concordia.ca>) |
| Список | pgsql-sql |
On Thu, 7 Sep 2006, Emi Lu wrote: > Hello, > > Is it possible to do something like: > > select ... > from t1 > inner join t2 ... > left join t2.colN > > When t1 inner join with t2 I got unique result for t2.colN( colN's value > is table name). > > Can I continue to left join with the column "colN" in table t2? No, in part because it'd have to actually evaluate the first join in order to even plan the remainder of the query. It might be possible to do something similar, albeit somewhat slowly, inside a set returning function, but you'd have to decide how to handle more than one row being returned from the first join even if the value is unique, is that one join against the table or multiple joins.
В списке pgsql-sql по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера