pg 9.0 note
authorPetr Skoda <skodak@moodle.org>
Tue, 21 Sep 2010 22:27:49 +0000 (22:27 +0000)
committerPetr Skoda <skodak@moodle.org>
Tue, 21 Sep 2010 22:27:49 +0000 (22:27 +0000)
lib/dml/pgsql_native_moodle_database.php

index c617835..bd70bba 100644 (file)
@@ -687,6 +687,7 @@ class pgsql_native_moodle_database extends moodle_database {
                 $id = reset($row);
                 if ($blobs) {
                     foreach ($blobs as $blob) {
+                        // note: in PostgreSQL 9.0 the returned blobs are hexencoded by default - see http://www.postgresql.org/docs/9.0/static/runtime-config-client.html#GUC-BYTEA-OUTPUT
                         $row[$blob] = $row[$blob] !== null ? pg_unescape_bytea($row[$blob]) : null;
                     }
                 }