Commit 4dc7149d 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 2e2899b9
......@@ -3287,7 +3287,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) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment