Search Postgresql Archives

PostgreSQL : error hint for LATERAL join

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxx
Fixe : +33 561078319

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux