+CREATE TEMP TABLE b_candidates (
+ source integer,
+ file integer,
+ architecture integer);
+
+INSERT INTO b_candidates (source, file, architecture)
+ SELECT b.source, b.file, b.architecture
+ FROM binaries b
+ JOIN bin_associations ba ON b.id = ba.bin
+ WHERE b.type = :type AND ba.suite = :suite AND
+ b.architecture IN (2, :architecture) %s;
+