From f7e4594df748499fe75fc80d036236b7cb86c85e Mon Sep 17 00:00:00 2001 From: nate Date: Mon, 14 May 2007 00:15:44 +0000 Subject: [PATCH] Adding schema support to Postgres driver (Ticket #1623) git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5085 3807eeeb-6ff5-0310-8944-8be069107fe0 --- cake/libs/model/datasources/dbo/dbo_postgres.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cake/libs/model/datasources/dbo/dbo_postgres.php b/cake/libs/model/datasources/dbo/dbo_postgres.php index da0ff9029..87c6342e7 100644 --- a/cake/libs/model/datasources/dbo/dbo_postgres.php +++ b/cake/libs/model/datasources/dbo/dbo_postgres.php @@ -47,6 +47,7 @@ class DboPostgres extends DboSource { 'login' => 'root', 'password' => '', 'database' => 'cake', + 'schema' => 'public', 'port' => 5432, 'encoding' => '' ); @@ -126,7 +127,8 @@ class DboPostgres extends DboSource { return $cache; } - $sql = "SELECT table_name as name FROM INFORMATION_SCHEMA.tables WHERE table_schema = 'public';"; + $schema = $this->config['schema']; + $sql = "SELECT table_name as name FROM INFORMATION_SCHEMA.tables WHERE table_schema = '{$schema}';"; $result = $this->fetchAll($sql); if (!$result) {