| От | Peter Eisentraut |
|---|---|
| Тема | Re: Subselects - recursion problem |
| Дата | |
| Msg-id | 200505301142.57483.peter_e@gmx.net обсуждение |
| Ответ на | Subselects - recursion problem (Philip Rhoades <phil@chu.com.au>) |
| Список | pgsql-general |
Philip Rhoades wrote: > The following script works (I have confirmed it by doing two separate > views and doing a select on them) - but I don't understand why there > isn't a recursion problem with c1.policy and c2.policy - is there > some sort of trick happening? The subquery is evaluated for each row of the outer query. The references to c1 are for each evaluation replaced by the current values of the outer query. For the purpose of the subquery, they behave like constants. Internally, the query might actually be transformed into a join of c1 and c2. Maybe that helps you grasp it. -- Peter Eisentraut http://developer.postgresql.org/~petere/
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера