Commit 7a0fef3e authored by Aaron Wells's avatar Aaron Wells
Browse files

CONCAT() not supported in Postgres prior to 9.1

Bug 1517658

Change-Id: I531a1c95b94910e564e71e1f2dc26754eefa45d5
behatnotneeded: platform-specific bug
parent 8c223036
......@@ -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) {
......
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