Skip to content
Permalink
Browse files

apply #3242

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@14748 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef
jef committed Nov 23, 2010
1 parent 0e3cc72 commit 874eb336fa0d6b975ad6882445d007bd592225ff
Showing with 7 additions and 6 deletions.
  1. +7 −6 src/providers/postgres/qgspostgresprovider.cpp
@@ -3138,19 +3138,20 @@ bool QgsPostgresProvider::getGeometryDetails()
"from " ).arg( quotedIdentifier( geometryColumn ) );
if ( mUseEstimatedMetadata )
{
sql += QString( "(select %1 from %2 where %1 is not null limit %3) as t" )
sql += QString( "(select %1 from %2 where %1 is not null" )
.arg( quotedIdentifier( geometryColumn ) )
.arg( mQuery )
.arg( sGeomTypeSelectLimit );
.arg( mQuery );
if ( !sqlWhereClause.isEmpty() )
sql += " and " + sqlWhereClause;
sql += QString( " limit %1 ) as t" ).arg( sGeomTypeSelectLimit );
}
else
{
sql += mQuery;
if ( !sqlWhereClause.isEmpty() )
sql += " where " + sqlWhereClause;
}

if ( !sqlWhereClause.isEmpty() )
sql += " where " + sqlWhereClause;

result = connectionRO->PQexec( sql );

if ( PQntuples( result ) == 1 )

0 comments on commit 874eb33

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