Original query:

SELECT 1
                  FROM distributions d
                  JOIN distribution_extensions de
                    ON d.name = de.distribution
                   AND (d.version COLLATE "C") = (de.dist_version COLLATE "C");