Skip to content

Commit

Permalink
postgres provider: speedup loading of layers by not verifing srid and…
Browse files Browse the repository at this point in the history
… geometry if given in the uri (fixes #9510)
  • Loading branch information
jef-n committed Feb 8, 2014
1 parent 417d497 commit 3701561
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/providers/postgres/qgspostgresprovider.cpp
Expand Up @@ -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" )
Expand Down

0 comments on commit 3701561

Please sign in to comment.