Skip to content

Commit 95bd748

Browse files
committed
postgres provider: use st_estimatedextent only when 'use estimated metadata' is enabled (fixes #21718)
1 parent a036586 commit 95bd748

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/providers/postgres/qgspostgresprovider.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -3237,7 +3237,7 @@ QgsRectangle QgsPostgresProvider::extent() const
32373237
QString ext;
32383238

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

0 commit comments

Comments
 (0)