Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
postgres provider: fix limit on geometry type detection with estimate…
…d meta data enabled
  • Loading branch information
jef-n committed Oct 3, 2013
1 parent 9b1f0a3 commit 4ea85fe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/providers/postgres/qgspostgresconn.cpp
Expand Up @@ -1112,10 +1112,10 @@ void QgsPostgresConn::retrieveLayerTypes( QgsPostgresLayerProperty &layerPropert
// our estimatation ignores that a where clause might restrict the feature type or srid
if ( useEstimatedMetadata )
{
table = QString( "(SELECT %1 FROM %2 WHERE %1 IS NOT NULL%3 LIMIT %4) AS t" )
table = QString( "(SELECT %1 FROM %2%3 LIMIT %4) AS t" )
.arg( quotedIdentifier( layerProperty.geometryColName ) )
.arg( table )
.arg( layerProperty.sql.isEmpty() ? "" : QString( " AND (%1)" ).arg( layerProperty.sql ) )
.arg( layerProperty.sql.isEmpty() ? "" : QString( " WHERE %1" ).arg( layerProperty.sql ) )
.arg( sGeomTypeSelectLimit );
}
else if ( !layerProperty.sql.isEmpty() )
Expand Down

0 comments on commit 4ea85fe

Please sign in to comment.