[DBAL-412] PostgreSqlSchemaManager::listTableColumns() fails if there are columns defined by domains in multiple schemas Created: 08/Jan/13 Updated: 01/May/13 Resolved: 01/May/13
|Component/s:||Platforms, Schema Managers|
|Reporter:||Roger Hunwicks||Assignee:||Benjamin Eberlei|
We use Postgresql Domains to ensure consistent column definitions across multiple tables. We also have multiple schemas in a database. Therefore we can have two domains defined in the same database with the same name, but in different schemas.
In this situation, PostgreSqlSchemaManager::listTableColumns() fails when called for a table with a column defined by one of those domains. This means that PostgreSqlSchemaManager::createSchema() also fails for a schema containing such a table.
This happens because of an error in the query definition in PostgreSqlPlatform::getListTableColumnsSQL(). The domain_complete_type column in the query is defined by matching the name only, without reference to the schema:
The error can be corrected by making sure that the correct domain is matched by using the OID instead of the name to match:
I can create a GitHub PR if it helps.
|Comment by Benjamin Eberlei [ 01/May/13 ]|