Skip to content
Permalink
Browse files

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

…tadata' is enabled (fixes #21718)

(cherry picked from commit 95bd748)
  • Loading branch information
jef-n committed Apr 2, 2019
1 parent 7ffc3ef commit d3ec6b590634d50826a30f6d5e27ac7af585a3c8
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 d3ec6b5

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