Skip to content
Permalink
Browse files

postgres provider fixes

  • Loading branch information
jef-n committed Jan 10, 2012
1 parent 9035cf7 commit ff6a46e8ef66e5cae8c33dda3e495b56d9bd6842
Showing with 4 additions and 3 deletions.
  1. +4 −3 src/providers/postgres/qgspostgresprovider.cpp
@@ -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:
@@ -2658,7 +2660,7 @@ bool QgsPostgresProvider::getGeometryDetails()

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

if ( type.isEmpty() && !type.contains( "," ) )
@@ -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 ) );

0 comments on commit ff6a46e

Please sign in to comment.
You can’t perform that action at this time.