Re: [HACKERS] Query fails when SRFs are part of FROM clause (Commitid: 69f4b9c85f)

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: [HACKERS] Query fails when SRFs are part of FROM clause (Commitid: 69f4b9c85f)
Дата
Msg-id CAKFQuwapfoxHYsHBygGHauV22CcHiRBYC5MA6zsKFC5XgKXqbg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] Query fails when SRFs are part of FROM clause (Commitid: 69f4b9c85f)  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-hackers
On Fri, Jan 27, 2017 at 3:13 PM, David G. Johnston <david.g.johnston@gmail.com> wrote:
In any case the more idiomatic way of writing your query these days (since 9.4 came out) is:

SELECT *
FROM pg_constraint pc
LEFT JOIN LATERAL generate_series(1, case when contype in ('f','p','u') then array_upper(pc.conkey, 1) else 0 end) gs ON true;


Supposedly ​should work back to 9.3​, mis-remembered when LATERAL was released.

David J.

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

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: [HACKERS] Query fails when SRFs are part of FROM clause (Commitid: 69f4b9c85f)
Следующее
От: Robert Haas
Дата:
Сообщение: Re: [HACKERS] Typo in comment in postgres_fdw.c