| От | Tom Lane |
|---|---|
| Тема | Re: Changed SRF in targetlist handling |
| Дата | |
| Msg-id | 24328.1465231298@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: Changed SRF in targetlist handling ("David G. Johnston" <david.g.johnston@gmail.com>) |
| Список | pgsql-hackers |
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> If the SRFs return a different number of rows the LCM behavior kicks in and
> you get Robert's second result.
Only if the periods of the SRFs are relatively prime. That is, neither of
his examples demonstrate the full weirdness of the current behavior; for
that, you need periods that are multiples of each other. For instance:
SELECT generate_series(1, 2), generate_series(1, 4); generate_series | generate_series
-----------------+----------------- 1 | 1 2 | 2 1 |
3 2 | 4
(4 rows)
That doesn't comport with any behavior available from LATERAL.
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера