Skip to content

Commit d226d9b

Browse files
author
g_j_m
committed
Fix for ticket #277 (problem loading a view of a view)
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@5877 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent f2dda7f commit d226d9b

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

src/providers/postgres/qgspostgresprovider.cpp

+10-5
Original file line numberDiff line numberDiff line change
@@ -1413,17 +1413,22 @@ void QgsPostgresProvider::findColumns(tableCols& cols)
14131413
<< " refers to.\n";
14141414
#endif
14151415

1416-
ii = columnRelations.find(QString(ii->second.table_schema + '.' +
1417-
ii->second.table_name + '.' +
1418-
ii->second.column_name));
1419-
if (ii == columnRelations.end())
1416+
columnRelationsType::const_iterator
1417+
jj = columnRelations.find(QString(ii->second.table_schema + '.' +
1418+
ii->second.table_name + '.' +
1419+
ii->second.column_name));
1420+
1421+
if (jj == columnRelations.end())
14201422
{
1421-
std::cerr << "ERROR: Failed to find the column that "
1423+
std::cerr << "WARNING: Failed to find the column that "
14221424
<< ii->second.table_schema.local8Bit().data() << '.'
14231425
<< ii->second.table_name.local8Bit().data() << "."
14241426
<< ii->second.column_name.local8Bit().data()
14251427
<< " refers to.\n";
1428+
break;
14261429
}
1430+
1431+
ii = jj;
14271432
++count;
14281433
}
14291434

0 commit comments

Comments
 (0)