浏览代码

Merge pull request #2571 from cuppett/patch-1

Must double quote the schema name in query
Mark Story 12 年之前
父节点
当前提交
4ae1feaf2d
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      lib/Cake/Model/Datasource/Database/Postgres.php

+ 1 - 1
lib/Cake/Model/Datasource/Database/Postgres.php

@@ -127,7 +127,7 @@ class Postgres extends DboSource {
 				$this->setEncoding($config['encoding']);
 			}
 			if (!empty($config['schema'])) {
-				$this->_execute('SET search_path TO ' . $config['schema']);
+				$this->_execute('SET search_path TO "' . $config['schema'] . '"');
 			}
 			if (!empty($config['settings'])) {
 				foreach ($config['settings'] as $key => $value) {