diff --git a/drivers/pgsql.php b/drivers/pgsql.php
index a5d2250..d61f43f 100644
--- a/drivers/pgsql.php
+++ b/drivers/pgsql.php
@@ -89,8 +89,15 @@ SQL;
$res = $this->query($sql);
$tables = $res->fetchAll(PDO::FETCH_ASSOC);
+
+ $good_tables = array();
+
+ foreach($tables as $t)
+ {
+ $good_tables[] = $t['tablename'];
+ }
- return $tables;
+ return $good_tables;
}
// --------------------------------------------------------------------------
diff --git a/tests/databases/pgsql.php b/tests/databases/pgsql.php
index 1c4fedd..7dc4224 100644
--- a/tests/databases/pgsql.php
+++ b/tests/databases/pgsql.php
@@ -52,9 +52,16 @@ class PgTest extends DBTest {
$this->assertIsA($this->db, 'PgSQL');
}
- /*function TestCreateTable()
+ function TestCreateTable()
{
if (empty($this->db)) return;
+
+ // Drop the table(s) if they exist
+ $sql = 'DROP TABLE IF EXISTS "create_test"';
+ $this->db->query($sql);
+ $sql = 'DROP TABLE IF EXISTS "create_join"';
+ $this->db->query($sql);
+
//Attempt to create the table
$sql = $this->db->sql->create_table('create_test',
@@ -83,12 +90,16 @@ class PgTest extends DBTest {
);
$this->db->query($sql);
- echo $sql.'
';
+ //echo $sql.'
';
+
+ //Reset
+ unset($this->db);
+ $this->setUp();
//Check
$dbs = $this->db->get_tables();
-
+ print_r($dbs);
$this->assertTrue(in_array('create_test', $dbs));
- }*/
+ }
}
\ No newline at end of file
diff --git a/tests/test_dbs/FB_TEST_DB.FDB b/tests/test_dbs/FB_TEST_DB.FDB
index 9f4bf1c..8726772 100755
Binary files a/tests/test_dbs/FB_TEST_DB.FDB and b/tests/test_dbs/FB_TEST_DB.FDB differ