Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add update_record() postgres bytea support

To get ready for the postgres utf8 migration script
  • Loading branch information...
commit 64421244267f24d7feacba78f32d818582fd4432 1 parent d70fd56
patrickslee authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/datalib.php
4 lib/datalib.php
View
@@ -1241,6 +1241,10 @@ function update_record($table, $dataobject) {
foreach ($columns as $column) {
if ($column->name <> 'id' and isset($data[$column->name]) ) {
$ddd[$column->name] = $data[$column->name];
+ // PostgreSQL bytea support
+ if ($CFG->dbtype == 'postgres7' && $column->type == 'bytea') {
+ $ddd[$column->name] = $db->BlobEncode($ddd[$column->name]);
+ }
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.