Re: Trying to fetch records only if preceded by at least another one

Поиск
Список
Период
Сортировка
От Michael Lewis
Тема Re: Trying to fetch records only if preceded by at least another one
Дата
Msg-id CAHOFxGonSvqwT=MHJQZ=jbmVg+BqpAYj5vfJos3y96R9bHc97w@mail.gmail.com
обсуждение исходный текст
Ответ на Trying to fetch records only if preceded by at least another one  (Alexander Farber <alexander.farber@gmail.com>)
Ответы Re: Trying to fetch records only if preceded by at least another one  (Alexander Farber <alexander.farber@gmail.com>)
Список pgsql-general
But it prints too many records: all moves cross-multiplied with each other.

As if I have forgotten to add 1 more condition to the JOIN LATERAL

LIMIT 1 inside your lateral should resolve that. Personally, I'd move that condition to EXISTS condition inside WHERE clause instead. Just a style thing as far as I know. 

В списке pgsql-general по дате отправления:

Предыдущее
От: rihad
Дата:
Сообщение: Re: Quere keep using temporary files
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Quere keep using temporary files