blob: 11b934fe23f794606c93ff9d08243c4091b90f4a [file]
-- Shape: the same bare IN, wrapped in COALESCE so the NULL result becomes
-- false. The wrapper is the common way to use a projected IN, and it must not
-- stop the decorrelation.
SELECT
count(*) FILTER (WHERE m) AS true_count
FROM (SELECT id, COALESCE((id IN (SELECT id FROM inner_t))::boolean, false) AS m FROM outer_t);