limit 1 in the inner query causes the script to only import the first file from the filenames list (using Postgres 15), since the limit is applied after unnesting the filenames.
We can fix this by moving unnest(filenames) AS filename to the outer query, so that the limit is applied before unnesting the filenames.
Fixes #12
limit 1
in the inner query causes the script to only import the first file from thefilenames
list (using Postgres 15), since the limit is applied after unnesting the filenames.unnest(filenames) AS filename
to the outer query, so that the limit is applied before unnesting the filenames.