diff options
-rw-r--r-- | connectivity/source/drivers/postgresql/pq_resultsetmetadata.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/connectivity/source/drivers/postgresql/pq_resultsetmetadata.cxx b/connectivity/source/drivers/postgresql/pq_resultsetmetadata.cxx index 8a8845f07dea..15bbc5c6eb48 100644 --- a/connectivity/source/drivers/postgresql/pq_resultsetmetadata.cxx +++ b/connectivity/source/drivers/postgresql/pq_resultsetmetadata.cxx @@ -213,9 +213,10 @@ void ResultSetMetaData::checkTable() } if( tables.is() ) { - OUString name = getTableName( 1 ); -// if( tables->hasByName( name ) ) - tables->getByName( name ) >>= m_table; + const OUString name (getTableName ( 1 )); + const OUString schema (getSchemaName( 1 )); + const OUString composedName( schema.isEmpty() ? name : (schema + "." + name) ); + tables->getByName( composedName ) >>= m_table; } } } |