Skip to content
Permalink
Browse files
postgres provider: fix feature count, when subset string is set
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@13499 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed May 16, 2010
1 parent 3f8f3c0 commit fc6fc016daad56ad3312aead14ca93dd6a014d32
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/providers/postgres/qgspostgresprovider.cpp
@@ -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 ) );
}

0 comments on commit fc6fc01

Please sign in to comment.