Last active
August 29, 2015 13:56
-
-
Save jef-n/8885683 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/src/providers/postgres/qgspostgresprovider.cpp b/src/providers/postgres/qgspostgresprovider.cpp | |
| index d13cbbf..77a1925 100644 | |
| --- a/src/providers/postgres/qgspostgresprovider.cpp | |
| +++ b/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" ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment