We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a2774a0 commit 38d960eCopy full SHA for 38d960e
src/providers/postgres/qgspostgresfeatureiterator.cpp
@@ -274,7 +274,9 @@ bool QgsPostgresFeatureIterator::declareCursor( const QString& whereClause )
274
{
275
query += QString( "%1(%2(%3%4),'%5')" )
276
.arg( P->mConnectionRO->majorVersion() < 2 ? "asbinary" : "st_asbinary" )
277
- .arg( P->mConnectionRO->majorVersion() < 2 ? "force_2d" : "st_force_2d" )
+ .arg( P->mConnectionRO->majorVersion() < 2 ? "force_2d"
278
+ : P->mConnectionRO->majorVersion() > 2 || P->mConnectionRO->minorVersion() > 0 ? "ST_Force2D"
279
+ : "st_force_2d" )
280
.arg( P->quotedIdentifier( P->mGeometryColumn ) )
281
.arg( P->mSpatialColType == sctGeography ? "::geometry" : "" )
282
.arg( P->endianString() );
0 commit comments