Please sign in to comment.
Fix queries in PostgreSQL Metadata and make schema optional in all dr…
…ivers. The metadata queries for PostgreSQL were incorrect. They were using the schema parameter as the table name (catalog in pgsql) which caused the queries to fail to produce any work. Furthermore the schema was hardcoded to 'public' negating the effect of the schema parameter. In addition to fixing the queries I made the schema parameter to a database connection optional. It now defaults to an empty string. In MySQL, SQlite, and Oracle this parameter is not used. PostgreSQL is likely the only RDBMS to use it. In the PostgreSQL metadata class if the schema is empty the default 'public' one is used. This is consistent with the database engine itself where tables created without a schema default to public.
- Loading branch information...
Showing with 63 additions and 35 deletions.
- +2 −9 PHPUnit/Extensions/Database/DB/DefaultDatabaseConnection.php
- +2 −2 PHPUnit/Extensions/Database/DB/MetaData.php
- +1 −5 PHPUnit/Extensions/Database/DB/MetaData/MySQL.php
- +56 −17 PHPUnit/Extensions/Database/DB/MetaData/PgSQL.php
- +1 −1 PHPUnit/Extensions/Database/DB/MetaData/Sqlite.php
- +1 −1 PHPUnit/Extensions/Database/TestCase.php