diff --git a/core/lib/Drupal/Core/Database/Driver/mysql/Schema.php b/core/lib/Drupal/Core/Database/Driver/mysql/Schema.php
index 6e5c40b..09a9b8e 100644
--- a/core/lib/Drupal/Core/Database/Driver/mysql/Schema.php
+++ b/core/lib/Drupal/Core/Database/Driver/mysql/Schema.php
@@ -409,7 +409,7 @@ public function fieldSetNoDefault($table, $field) {
   public function indexExists($table, $name) {
     // Returns one row for each column in the index. Result is string or FALSE.
     // Details at http://dev.mysql.com/doc/refman/5.0/en/show-index.html
-    $row = $this->connection->query('SHOW INDEX FROM {' . $table . "} WHERE key_name = '$name'")->fetchAssoc();
+    $row = $this->connection->query('SHOW INDEX FROM {' . $table . '} WHERE key_name = ' . $this->connection->quote($name))->fetchAssoc();
     return isset($row['Key_name']);
   }
 
@@ -489,9 +489,6 @@ public function changeField($table, $field, $field_new, $spec, $keys_new = array
   }
 
   public function prepareComment($comment, $length = NULL) {
-    // Work around a bug in some versions of PDO, see http://bugs.php.net/bug.php?id=41125
-    $comment = str_replace("'", '’', $comment);
-
     // Truncate comment to maximum comment length.
     if (isset($length)) {
       // Add table prefixes before truncating.
diff --git a/core/lib/Drupal/Core/Database/Driver/pgsql/Schema.php b/core/lib/Drupal/Core/Database/Driver/pgsql/Schema.php
index 269cc56..d4b8bbc 100644
--- a/core/lib/Drupal/Core/Database/Driver/pgsql/Schema.php
+++ b/core/lib/Drupal/Core/Database/Driver/pgsql/Schema.php
@@ -207,7 +207,7 @@ protected function createFieldSql($name, $spec) {
       }
     }
     if (isset($spec['default'])) {
-      $default = is_string($spec['default']) ? "'" . $spec['default'] . "'" : $spec['default'];
+      $default = is_string($spec['default']) ? $this->connection->quote($spec['default']) : $spec['default'];
       $sql .= " default $default";
     }
 
@@ -315,7 +315,7 @@ protected function _createKeySql($fields) {
         $return[] = 'substr(' . $field[0] . ', 1, ' . $field[1] . ')';
       }
       else {
-        $return[] = '"' . $field . '"';
+        $return[] = $this->connection->quote($field);
       }
     }
     return implode(', ', $return);
@@ -332,10 +332,10 @@ protected function createPrimaryKeySql($fields) {
     $return = array();
     foreach ($fields as $field) {
       if (is_array($field)) {
-        $return[] = '"' . $field[0] . '"';
+        $return[] = $this->connection->quote($field[0]);
       }
       else {
-        $return[] = '"' . $field . '"';
+        $return[] = $this->connection->quote($field);
       }
     }
     return implode(', ', $return);
@@ -426,7 +426,7 @@ public function dropField($table, $field) {
       return FALSE;
     }
 
-    $this->connection->query('ALTER TABLE {' . $table . '} DROP COLUMN "' . $field . '"');
+    $this->connection->query('ALTER TABLE {' . $table . '} DROP COLUMN ' . $this->connection->quote($field));
     return TRUE;
   }
 
@@ -439,10 +439,10 @@ public function fieldSetDefault($table, $field, $default) {
       $default = 'NULL';
     }
     else {
-      $default = is_string($default) ? "'$default'" : $default;
+      $default = is_string($default) ? $this->connection->quote($default) : $default;
     }
 
-    $this->connection->query('ALTER TABLE {' . $table . '} ALTER COLUMN "' . $field . '" SET DEFAULT ' . $default);
+    $this->connection->query('ALTER TABLE {' . $table . '} ALTER COLUMN ' . $this->connection->quote($field) . ' SET DEFAULT ' . $default);
   }
 
   public function fieldSetNoDefault($table, $field) {
@@ -456,7 +456,7 @@ public function fieldSetNoDefault($table, $field) {
   public function indexExists($table, $name) {
     // Details http://www.postgresql.org/docs/8.3/interactive/view-pg-indexes.html
     $index_name = '{' . $table . '}_' . $name . '_idx';
-    return (bool) $this->connection->query("SELECT 1 FROM pg_indexes WHERE indexname = '$index_name'")->fetchField();
+    return (bool) $this->connection->query('SELECT 1 FROM pg_indexes WHERE indexname = ' . $this->connection->quote($index_name))->fetchField();
   }
 
   /**
@@ -469,7 +469,7 @@ public function indexExists($table, $name) {
    */
   protected function constraintExists($table, $name) {
     $constraint_name = '{' . $table . '}_' . $name;
-    return (bool) $this->connection->query("SELECT 1 FROM pg_constraint WHERE conname = '$constraint_name'")->fetchField();
+    return (bool) $this->connection->query('SELECT 1 FROM pg_constraint WHERE conname = ' . $this->connection->quote($constraint_name))->fetchField();
   }
 
   public function addPrimaryKey($table, $fields) {
@@ -500,7 +500,7 @@ function addUniqueKey($table, $name, $fields) {
       throw new SchemaObjectExistsException(t("Cannot add unique key @name to table @table: unique key already exists.", array('@table' => $table, '@name' => $name)));
     }
 
-    $this->connection->query('ALTER TABLE {' . $table . '} ADD CONSTRAINT "' . $this->prefixNonTable($table, $name, 'key') . '" UNIQUE (' . implode(',', $fields) . ')');
+    $this->connection->query('ALTER TABLE {' . $table . '} ADD CONSTRAINT ' . $this->connection->quote($this->prefixNonTable($table, $name, 'key')). ' UNIQUE (' . implode(',', $fields) . ')');
   }
 
   public function dropUniqueKey($table, $name) {
@@ -508,7 +508,7 @@ public function dropUniqueKey($table, $name) {
       return FALSE;
     }
 
-    $this->connection->query('ALTER TABLE {' . $table . '} DROP CONSTRAINT "' . $this->prefixNonTable($table, $name, 'key') . '"');
+    $this->connection->query('ALTER TABLE {' . $table . '} DROP CONSTRAINT ' . $this->connection->quote($this->prefixNonTable($table, $name, 'key')));
     return TRUE;
   }
 
@@ -563,7 +563,7 @@ public function changeField($table, $field, $field_new, $spec, $new_keys = array
     $field_info = $this->queryFieldInformation($table, $field);
 
     foreach ($field_info as $check) {
-      $this->connection->query('ALTER TABLE {' . $table . '} DROP CONSTRAINT "' . $check . '"');
+      $this->connection->query('ALTER TABLE {' . $table . '} DROP CONSTRAINT ' . $this->connection->quote($check));
     }
 
     // Remove old default.
@@ -574,7 +574,7 @@ public function changeField($table, $field, $field_new, $spec, $new_keys = array
     // the typecast does not work for conversions to bytea.
     // @see http://www.postgresql.org/docs/current/static/datatype-binary.html
     if ($spec['pgsql_type'] != 'bytea') {
-      $this->connection->query('ALTER TABLE {' . $table . '} ALTER "' . $field . '" TYPE ' . $typecast . ' USING "' . $field . '"::' . $typecast);
+      $this->connection->query('ALTER TABLE {' . $table . '} ALTER ' . $this->connection->quote($field) . ' TYPE ' . $typecast . ' USING ' . $this->connection->quote($field) . '::' . $typecast);
     }
     else {
       // Do not attempt to convert a field that is bytea already.
@@ -583,7 +583,7 @@ public function changeField($table, $field, $field_new, $spec, $new_keys = array
         // Convert to a bytea type by using the SQL replace() function to
         // convert any single backslashes in the field content to double
         // backslashes ('\' to '\\').
-        $this->connection->query('ALTER TABLE {' . $table . '} ALTER "' . $field . '" TYPE ' . $typecast . ' USING decode(replace("' . $field . '"' . ", '\\', '\\\\'), 'escape');");
+        $this->connection->query('ALTER TABLE {' . $table . '} ALTER ' . $this->connection->quote($field) . ' TYPE ' . $typecast . ' USING decode(replace("' . $field . '"' . ", '\\', '\\\\'), 'escape');");
       }
     }
 
@@ -594,7 +594,7 @@ public function changeField($table, $field, $field_new, $spec, $new_keys = array
       else {
         $nullaction = 'DROP NOT NULL';
       }
-      $this->connection->query('ALTER TABLE {' . $table . '} ALTER "' . $field . '" ' . $nullaction);
+      $this->connection->query('ALTER TABLE {' . $table . '} ALTER ' . $this->connection->quote($field) . ' ' . $nullaction);
     }
 
     if (in_array($spec['pgsql_type'], array('serial', 'bigserial'))) {
@@ -605,18 +605,18 @@ public function changeField($table, $field, $field_new, $spec, $new_keys = array
       $this->connection->query("CREATE SEQUENCE " . $seq);
       // Set sequence to maximal field value to not conflict with existing
       // entries.
-      $this->connection->query("SELECT setval('" . $seq . "', MAX(\"" . $field . '")) FROM {' . $table . "}");
-      $this->connection->query('ALTER TABLE {' . $table . '} ALTER "' . $field . '" SET DEFAULT nextval(\'' . $seq . '\')');
+      $this->connection->query('SELECT setval(' . $this->connection->quote($seq) . ', MAX(' . $this->connection->quote($field) . ')) FROM {' . $table . '}');
+      $this->connection->query('ALTER TABLE {' . $table . '} ALTER ' . $this->connection->quote($field) . ' SET DEFAULT nextval(' . $this->connection->quote($seq) . ')');
     }
 
     // Rename the column if necessary.
     if ($field != $field_new) {
-      $this->connection->query('ALTER TABLE {' . $table . '} RENAME "' . $field . '" TO "' . $field_new . '"');
+      $this->connection->query('ALTER TABLE {' . $table . '} RENAME ' . $this->connection->quote($field) . ' TO ' . $this->connection->quote($field_new));
     }
 
     // Add unsigned check if necessary.
     if (!empty($spec['unsigned'])) {
-      $this->connection->query('ALTER TABLE {' . $table . '} ADD CHECK ("' . $field_new . '" >= 0)');
+      $this->connection->query('ALTER TABLE {' . $table . '} ADD CHECK (' . $this->connection->quote($field_new) . ' >= 0)');
     }
 
     // Add default if necessary.
@@ -626,7 +626,7 @@ public function changeField($table, $field, $field_new, $spec, $new_keys = array
 
     // Change description if necessary.
     if (!empty($spec['description'])) {
-      $this->connection->query('COMMENT ON COLUMN {' . $table . '}."' . $field_new . '" IS ' . $this->prepareComment($spec['description']));
+      $this->connection->query('COMMENT ON COLUMN {' . $table . '}.' . $this->connection->quote($field_new) . ' IS ' . $this->prepareComment($spec['description']));
     }
 
     if (isset($new_keys)) {
@@ -635,7 +635,7 @@ public function changeField($table, $field, $field_new, $spec, $new_keys = array
   }
 
   protected function _createIndexSql($table, $name, $fields) {
-    $query = 'CREATE INDEX "' . $this->prefixNonTable($table, $name, 'idx') . '" ON {' . $table . '} (';
+    $query = 'CREATE INDEX ' . $this->connection->quote($this->prefixNonTable($table, $name, 'idx')) . ' ON {' . $table . '} (';
     $query .= $this->_createKeySql($fields) . ')';
     return $query;
   }
diff --git a/core/lib/Drupal/Core/Database/Driver/sqlite/Schema.php b/core/lib/Drupal/Core/Database/Driver/sqlite/Schema.php
index 9c9d5ac..2699ba5 100644
--- a/core/lib/Drupal/Core/Database/Driver/sqlite/Schema.php
+++ b/core/lib/Drupal/Core/Database/Driver/sqlite/Schema.php
@@ -179,7 +179,7 @@ protected function createFieldSql($name, $spec) {
 
       if (isset($spec['default'])) {
         if (is_string($spec['default'])) {
-          $spec['default'] = "'" . $spec['default'] . "'";
+          $spec['default'] = $this->connection->quote($spec['default']);
         }
         $sql .= ' DEFAULT ' . $spec['default'];
       }
