? 315047-postgres-make-changefield-reserved-word-safe.patch
Index: includes/database/pgsql/schema.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/database/pgsql/schema.inc,v
retrieving revision 1.15
diff -u -p -r1.15 schema.inc
--- includes/database/pgsql/schema.inc	29 May 2009 01:51:46 -0000	1.15
+++ includes/database/pgsql/schema.inc	7 Jun 2009 14:36:28 -0000
@@ -547,7 +547,7 @@ class DatabaseSchema_pgsql extends Datab
    *   table specification but without the 'fields' element.
    */
   public function changeField(&$ret, $table, $field, $field_new, $spec, $new_keys = array()) {
-    $ret[] = update_sql("ALTER TABLE {" . $table . "} RENAME $field TO " . $field . "_old");
+    $ret[] = update_sql('ALTER TABLE {' . $table . '} RENAME "' . $field . '" TO ' . $field . '_old');
     $not_null = isset($spec['not null']) ? $spec['not null'] : FALSE;
     unset($spec['not null']);
 
