Commit 274c4f17 authored by Aaron Wells's avatar Aaron Wells Committed by Robert Lyon
Browse files

CONCAT() not supported in Postgres prior to 9.1

Bug 1517658

Change-Id: I531a1c95b94910e564e71e1f2dc26754eefa45d5
behatnotneeded: platform-specific bug
(cherry picked from commit 7a0fef3e)
parent de15d730
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3337,7 +3337,7 @@ function xmldb_core_upgrade($oldversion=0) {
            }
            else {
                // Postgres can only handle limit in subquery
                execute_sql("UPDATE {artefact} SET path = CONCAT('/', id) WHERE id IN (SELECT id FROM {artefact} WHERE path IS NULL AND parent IS NULL LIMIT " . $limitsmall . ")");
                execute_sql("UPDATE {artefact} SET path = '/' || id WHERE id IN (SELECT id FROM {artefact} WHERE path IS NULL AND parent IS NULL LIMIT " . $limitsmall . ")");
            }
            $count += $limitsmall;
            if (($count % $limit) == 0 || $count >= $total) {