Fix the select-source-files-missing-nars query

Previously, the VALUES list wasn't being generated properly.
This commit is contained in:
Christopher Baines 2021-09-16 17:01:34 +01:00
parent f2b9663cf2
commit 8b34126d22

View file

@ -1753,10 +1753,13 @@ WHERE " criteria ";"))
" "
WITH RECURSIVE all_derivations AS ( WITH RECURSIVE all_derivations AS (
SELECT column1 AS derivation_id SELECT column1 AS derivation_id
FROM (VALUES (" FROM (VALUES "
(string-join (map number->string ids) (string-join (map
(lambda (id)
(string-append "(" id ")"))
(map number->string ids))
", ") ", ")
")) AS data ") AS data
UNION UNION
SELECT derivation_outputs.derivation_id SELECT derivation_outputs.derivation_id
FROM all_derivations FROM all_derivations