Skip to content

Commit

Permalink
postgres provider: fix feature count, when subset string is set
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@13499 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed May 16, 2010
1 parent dfcc09f commit 7340172
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/providers/postgres/qgspostgresprovider.cpp
Expand Up @@ -2767,7 +2767,7 @@ long QgsPostgresProvider::getFeatureCount()
// a thread the task of getting the full count.
QString sql;

if ( !isQuery && mUseEstimatedMetadata )
if ( !isQuery && mUseEstimatedMetadata && sqlWhereClause.isEmpty() )
{
sql = QString( "select reltuples::int from pg_catalog.pg_class where oid=regclass(%1)::oid" ).arg( quotedValue( mQuery ) );
}
Expand Down

0 comments on commit 7340172

Please sign in to comment.