Skip to content
Permalink
Browse files
postgres provider: speedup loading of layers by not verifing srid and…
… geometry if given in the uri (fixes #9510)
  • Loading branch information
jef-n committed Feb 8, 2014
1 parent 417d497 commit 370156148969b5e755f847ebb8c31eb1aad5c0f7
Showing with 3 additions and 4 deletions.
  1. +3 −4 src/providers/postgres/qgspostgresprovider.cpp
@@ -2565,10 +2565,9 @@ bool QgsPostgresProvider::getGeometryDetails()
}
}

QString detectedType;
QString detectedSrid;

if ( !schemaName.isEmpty() )
QString detectedType = mRequestedGeomType == QGis::WKBUnknown ? "" : QgsPostgresConn::postgisWkbTypeName( mRequestedGeomType );
QString detectedSrid = mRequestedSrid;
if ( !schemaName.isEmpty() && (detectedType.isEmpty() || detectedSrid.isEmpty() ) )
{
// check geometry columns
sql = QString( "SELECT upper(type),srid FROM geometry_columns WHERE f_table_name=%1 AND f_geometry_column=%2 AND f_table_schema=%3" )

0 comments on commit 3701561

Please sign in to comment.