1
0
mirror of synced 2024-12-14 15:16:04 +03:00

fixed pgsql import driver

This commit is contained in:
zYne 2007-01-24 22:12:34 +00:00
parent b6e8c40067
commit 7e1c763d5a

View File

@ -148,8 +148,10 @@ class Doctrine_Import_Pgsql extends Doctrine_Import
*/
public function listTableColumns($table)
{
$table = $this->conn->quote($table);
$query = sprintf($this->sql['listTableColumns'], $table);
$result = $this->conn->fetchAssoc($query);
$result = $this->dbh->query($this->sql['listTableColumns'])->fetchAll(PDO::FETCH_ASSOC);
$columns = array();
foreach ($result as $key => $val) {
if ($val['type'] === 'varchar') {
@ -190,7 +192,7 @@ class Doctrine_Import_Pgsql extends Doctrine_Import
*/
public function listTables($database = null)
{
return $this->dbh->query($this->sql['listTables'])->fetchAll(PDO::FETCH_ASSOC);
return $this->conn->fetchAssoc($this->sql['listTables']);
}
/**
* lists table triggers