diff --git a/src/providers/postgres/qgspostgresconn.cpp b/src/providers/postgres/qgspostgresconn.cpp index c81159861316..a2aa540b83ad 100644 --- a/src/providers/postgres/qgspostgresconn.cpp +++ b/src/providers/postgres/qgspostgresconn.cpp @@ -1094,7 +1094,7 @@ bool QgsPostgresConn::getTableInfo( bool searchGeometryColumnsOnly, bool searchP else { bool keepRasterTable = true; - for ( QgsPostgresRasterOverviewLayerProperty overview : overviews ) + for ( const QgsPostgresRasterOverviewLayerProperty &overview : std::as_const( overviews ) ) { if ( property.schemaName == overview.schemaName && property.tableName == overview.tableName ) {