Skip to content

Commit

Permalink
postgres provider changes:
Browse files Browse the repository at this point in the history
- ignore infinite filter rectangles
- also disconnect selection connection if no supported layers were found
  • Loading branch information
jef-n committed Jan 2, 2014
1 parent cb48f51 commit a47baba
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/providers/postgres/qgscolumntypethread.cpp
Expand Up @@ -62,6 +62,8 @@ void QgsGeomColumnTypeThread::run()
mAllowGeometrylessTables ) ||
layerProperties.isEmpty() )
{
mConn->disconnect();
mConn = 0;
return;
}

Expand Down
8 changes: 6 additions & 2 deletions src/providers/postgres/qgspostgresfeatureiterator.cpp
Expand Up @@ -210,8 +210,12 @@ QString QgsPostgresFeatureIterator::whereClauseRect()
if ( P->mSpatialColType == sctGeography )
{
rect = QgsRectangle( -180.0, -90.0, 180.0, 90.0 ).intersect( &rect );
if ( !rect.isFinite() )
return "false";
}

if ( !rect.isFinite() )
{
QgsMessageLog::logMessage( QObject::tr( "Infinite filter rectangle specified" ), QObject::tr( "PostGIS" ) );
return "false";
}

QString qBox;
Expand Down

0 comments on commit a47baba

Please sign in to comment.