From e642476c1c238a33f2e52421ca5cfd08787276a3 Mon Sep 17 00:00:00 2001 From: g_j_m Date: Wed, 27 Sep 2006 09:10:32 +0000 Subject: [PATCH] Fix for ticket #277 (problem loading a view of a view) git-svn-id: http://svn.osgeo.org/qgis/trunk@5877 c8812cc2-4d05-0410-92ff-de0c093fc19c --- src/providers/postgres/qgspostgresprovider.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/providers/postgres/qgspostgresprovider.cpp b/src/providers/postgres/qgspostgresprovider.cpp index f76f7d224c3..4929ad0ee13 100644 --- a/src/providers/postgres/qgspostgresprovider.cpp +++ b/src/providers/postgres/qgspostgresprovider.cpp @@ -1413,17 +1413,22 @@ void QgsPostgresProvider::findColumns(tableCols& cols) << " refers to.\n"; #endif - ii = columnRelations.find(QString(ii->second.table_schema + '.' + - ii->second.table_name + '.' + - ii->second.column_name)); - if (ii == columnRelations.end()) + columnRelationsType::const_iterator + jj = columnRelations.find(QString(ii->second.table_schema + '.' + + ii->second.table_name + '.' + + ii->second.column_name)); + + if (jj == columnRelations.end()) { - std::cerr << "ERROR: Failed to find the column that " + std::cerr << "WARNING: Failed to find the column that " << ii->second.table_schema.local8Bit().data() << '.' << ii->second.table_name.local8Bit().data() << "." << ii->second.column_name.local8Bit().data() << " refers to.\n"; + break; } + + ii = jj; ++count; }