Skip to content
Permalink
Browse files

postgres provider: use st_estimatedextent only when 'use estimated me…

…tadata' is enabled (fixes #21718)
  • Loading branch information
jef-n committed Apr 2, 2019
1 parent a036586 commit 95bd7480d0f0b65359e23bee5454e066fb712cab
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/providers/postgres/qgspostgresprovider.cpp
@@ -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" )

0 comments on commit 95bd748

Please sign in to comment.
You can’t perform that action at this time.