diff --git a/lib/driver/pg.js b/lib/driver/pg.js
index <HASH>..<HASH> 100644
--- a/lib/driver/pg.js
+++ b/lib/driver/pg.js
@@ -220,14 +220,14 @@ var PgDriver = Base.extend({
 
           var searchPath;
 
-          // if the user specified a different schema, prepend it to the
-          // search path. This will make all DDL/DML/SQL operate on the specified
-          // schema.
-          if (this.schema === 'public') {
-              searchPath = result[0].search_path;
-          } else {
-              searchPath = this.schema + ',' + result[0].search_path;
-          }
+            // if the user specified a different schema, prepend it to the
+            // search path. This will make all DDL/DML/SQL operate on the specified
+            // schema.
+            if (this.schema === 'public') {
+                searchPath = result[0].search_path;
+            } else {
+                searchPath = '"' + this.schema + '",' + result[0].search_path;
+            }
 
           return this.all('SET search_path TO ' + searchPath);
         }.bind(this))
Escape schema for postgres

If the name chosen for a schema contains certain characters, it must be
surrounded in quotes. This ensures those quotes are added when choosing the
schema by setting the `search_path`.