Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
postgres provider fixes
  • Loading branch information
jef-n committed Jan 10, 2012
1 parent 9035cf7 commit ff6a46e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/providers/postgres/qgspostgresprovider.cpp 100755 → 100644
Expand Up @@ -453,9 +453,11 @@ bool QgsPostgresProvider::getFeature( QgsPostgresResult &queryResult, int row, b
switch ( mPrimaryKeyType )
{
case pktOid:
case pktInt:
case pktTid:
case pktInt:
fid = mConnectionRO->getBinaryInt( queryResult, row, col++ );
if ( mPrimaryKeyType == pktInt && fetchAttributes.contains( mPrimaryKeyAttrs[0] ) )
feature.addAttribute( mPrimaryKeyAttrs[0], fid );
break;

case pktFidMap:
Expand Down Expand Up @@ -2658,7 +2660,7 @@ bool QgsPostgresProvider::getGeometryDetails()

if ( srid.isEmpty() )
{
srid = layerProperty.srid;
srid = QString::number( layerProperty.srid );
}

if ( type.isEmpty() && !type.contains( "," ) )
Expand Down Expand Up @@ -2698,7 +2700,6 @@ bool QgsPostgresProvider::getGeometryDetails()
mEnabledCapabilities &= ~( QgsVectorDataProvider::ChangeGeometries | QgsVectorDataProvider::AddFeatures );
}


QgsDebugMsg( "Detected SRID is " + mDetectedSrid );
QgsDebugMsg( "Requested SRID is " + mRequestedSrid );
QgsDebugMsg( "Detected type is " + QString::number( mDetectedGeomType ) );
Expand Down

0 comments on commit ff6a46e

Please sign in to comment.