Lateral

https://www.postgresql.org/docs/current/queries-table-expressions.html#QUERIES-LATERAL:~:text=7.2.1.5.%C2%A0LATERAL%20Subqueries

Allows subqueries to reference elements from the left side table.

Literals get evaluated once per row in the left side table.

SELECT * FROM foo, LATERAL (SELECT * FROM bar WHERE bar.id = foo.bar_id) ss;

You would typically use this when you need to compute some value

SELECT m.name
FROM manufacturers m LEFT JOIN LATERAL get_product_names(m.id) pname ON true
WHERE pname IS NULL;