Skip to content
Permalink
Browse files

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 4ea85fe50a0e2390917347b7218de13e6c57ed26
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/providers/postgres/qgspostgresconn.cpp
@@ -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() )

0 comments on commit 4ea85fe

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