Implementing listSources for postgres

This commit is contained in:
José Lorenzo Rodríguez 2010-10-18 00:08:34 -04:30
parent aedf69dee1
commit 5c87daf083
2 changed files with 4 additions and 4 deletions

View file

@ -161,8 +161,8 @@ class DboPostgres extends DboSource {
}
$schema = $this->config['schema'];
$sql = "SELECT table_name as name FROM INFORMATION_SCHEMA.tables WHERE table_schema = '{$schema}';";
$result = $this->fetchAll($sql, false);
$sql = "SELECT table_name as name FROM INFORMATION_SCHEMA.tables WHERE table_schema = ?";
$result = $this->_execute($sql, array($schema));
if (!$result) {
return array();
@ -170,7 +170,7 @@ class DboPostgres extends DboSource {
$tables = array();
foreach ($result as $item) {
$tables[] = $item[0]['name'];
$tables[] = $item->Name;
}
parent::listSources($tables);

View file

@ -427,7 +427,7 @@ class DboPostgresTest extends CakeTestCase {
$db2 = clone $db1;
$db2->connect();
$this->assertNotEqual($db1->connection, $db2->connection);
$this->assertNotSame($db1->getConnection(), $db2->getConnection());
$table = $db1->fullTableName('users', false);
$password = '5f4dcc3b5aa765d61d8327deb882cf99';