From 3abd531fba32ef7f4b994f6b11ff263c98dbe4c5 Mon Sep 17 00:00:00 2001 From: Angie Byron Date: Tue, 4 Aug 2009 06:32:17 +0000 Subject: #315047 by Josh Waihi: Escape PostgreSQL column names in the changeField function. --- includes/database/pgsql/schema.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'includes') diff --git a/includes/database/pgsql/schema.inc b/includes/database/pgsql/schema.inc index e438b5d76..4c638c92c 100644 --- a/includes/database/pgsql/schema.inc +++ b/includes/database/pgsql/schema.inc @@ -547,7 +547,7 @@ class DatabaseSchema_pgsql extends DatabaseSchema { * 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']); -- cgit v1.2.3