diff --git a/whelk-core/src/main/groovy/whelk/component/PostgreSQLComponent.groovy b/whelk-core/src/main/groovy/whelk/component/PostgreSQLComponent.groovy index fd45f68f52..9bb165c9ad 100644 --- a/whelk-core/src/main/groovy/whelk/component/PostgreSQLComponent.groovy +++ b/whelk-core/src/main/groovy/whelk/component/PostgreSQLComponent.groovy @@ -120,7 +120,7 @@ class PostgreSQLComponent { "SELECT id, data FROM lddb__versions WHERE id = ? AND checksum = ?" private static final String BULK_LOAD_DOCUMENTS = """ - SELECT in_id as id, data, created, modified, deleted + SELECT id, data, created, modified, deleted FROM unnest(?) AS in_id, lddb l WHERE in_id = l.id """.stripIndent()