Skip to content

Commit

Permalink
postgres provider: use st_estimatedextent only when 'use estimated me…
Browse files Browse the repository at this point in the history
…tadata' is enabled (fixes #21718)
  • Loading branch information
jef-n committed Apr 2, 2019
1 parent a036586 commit 95bd748
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/providers/postgres/qgspostgresprovider.cpp
Expand Up @@ -3237,7 +3237,7 @@ QgsRectangle QgsPostgresProvider::extent() const
QString ext;

// get the extents
if ( !mIsQuery && ( mUseEstimatedMetadata || mSqlWhereClause.isEmpty() ) )
if ( !mIsQuery && mUseEstimatedMetadata )
{
// do stats exists?
sql = QStringLiteral( "SELECT count(*) FROM pg_stats WHERE schemaname=%1 AND tablename=%2 AND attname=%3" )
Expand Down

0 comments on commit 95bd748

Please sign in to comment.