Skip to content

Commit

Permalink
Fix provided column type pg
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Mar 27, 2020
1 parent bf4359b commit 1186561
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
20 changes: 20 additions & 0 deletions src/providers/postgres/qgspostgresconn.cpp
Expand Up @@ -2020,6 +2020,26 @@ void QgsPostgresConn::postgisWkbType( QgsWkbTypes::Type wkbType, QString &geomet
geometryType = QStringLiteral( "MULTIPOLYGON" );
break;

case QgsWkbTypes::CircularString:
geometryType = QStringLiteral( "CIRCULARSTRING" );
break;

case QgsWkbTypes::CompoundCurve:
geometryType = QStringLiteral( "COMPOUNDCURVE" );
break;

case QgsWkbTypes::CurvePolygon:
geometryType = QStringLiteral( "CURVEPOLYGON" );
break;

case QgsWkbTypes::MultiCurve:
geometryType = QStringLiteral( "MULTICURVE" );
break;

case QgsWkbTypes::MultiSurface:
geometryType = QStringLiteral( "MULTISURFACE" );
break;

case QgsWkbTypes::Unknown:
geometryType = QStringLiteral( "GEOMETRY" );
break;
Expand Down
2 changes: 1 addition & 1 deletion src/providers/postgres/qgspostgresprovider.cpp
Expand Up @@ -3642,7 +3642,7 @@ bool QgsPostgresProvider::getGeometryDetails()
detectedType += QLatin1String( "ZM" );

QString ds = result.PQgetvalue( 0, 1 );
if ( ds != "0" ) detectedSrid = ds;
if ( ds != QLatin1String( "0" ) ) detectedSrid = ds;
mSpatialColType = SctGeometry;
}
else
Expand Down

0 comments on commit 1186561

Please sign in to comment.