PostgreSQL : error hint for LATERAL join

Поиск
Список
Период
Сортировка
От PALAYRET Jacques
Тема PostgreSQL : error hint for LATERAL join
Дата
Msg-id 472671960.55252257.1649406546838.JavaMail.zimbra@meteo.fr
обсуждение исходный текст
Ответы Re: PostgreSQL : error hint for LATERAL join  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-general
Hello,

For a LATERAL join, I think the hint (in case of error) is incomplete :

" DÉTAIL : The combining JOIN type must be INNER or LEFT for a LATERAL reference. "
 to be replaced by :
" DÉTAIL : The combining JOIN type must be CROSS, INNER or LEFT for a LATERAL reference. "

Note : it depends on what is needed

SELECT *
FROM (
SELECT 'a'
) t (c1)
 LEFT OUTER JOIN LATERAL (
SELECT 'b', c1
) u(d1) ON true
;
 c1 | d1 | c1
----+----+----
 a  | b  | a
(1 ligne)

SELECT *
FROM (
SELECT 'a'
) t (c1)
 INNER JOIN LATERAL (
SELECT 'b', c1
) u(d1) ON true
;
 c1 | d1 | c1
----+----+----
 a  | b  | a
(1 ligne)

SELECT *
FROM (
SELECT 'a'
) t (c1)
 CROSS JOIN LATERAL (
SELECT 'b', c1
) u(d1)
;
 c1 | d1 | c1
----+----+----
 a  | b  | a
(1 ligne)


Regards
----- Météo-France -----
PALAYRET JACQUES
DCSC/GDC
jacques.palayret@meteo.fr
Fixe : +33 561078319

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

Предыдущее
От: friend.have_00@icloud.com
Дата:
Сообщение: Could not read block 0 in file
Следующее
От: Vijaykumar Jain
Дата:
Сообщение: Re: Could not read block 0 in file