@@ -461,9 +461,10 @@ qint64 QgsPostgresProvider::getBinaryInt( PGresult *queryResult, int row, int co
461461 QString buf = " " ;
462462 for ( size_t i = 0 ; i < s; i++ )
463463 {
464- buf += QString ( " %1 " ).arg ( *( char * )( p + i ), 0 , 16 , QLatin1Char ( ' ' ) );
464+ buf += QString ( " %1 " ).arg ( *( unsigned char * )( p + i ), 0 , 16 , QLatin1Char ( ' ' ) );
465465 }
466- QgsDebugMsg ( QString ( " int in hex:%1" ).arg ( buf ) );
466+
467+ QgsDebugMsgLevel ( QString ( " int in hex:%1" ).arg ( buf ), 3 );
467468
468469 switch ( s )
469470 {
@@ -530,7 +531,7 @@ bool QgsPostgresProvider::getFeature( PGresult *queryResult, int row, bool fetch
530531 try
531532 {
532533 QgsFeatureId oid = getBinaryInt ( queryResult, row, 0 );
533- QgsDebugMsg ( QString ( " oid=%1" ).arg ( oid ) );
534+ QgsDebugMsgLevel ( QString ( " oid=%1" ).arg ( oid ), 3 );
534535
535536 feature.setFeatureId ( oid );
536537 feature.clearAttributeMap ();
@@ -3145,7 +3146,7 @@ bool QgsPostgresProvider::deduceEndian()
31453146 QgsDebugMsg ( QString ( " First oid is %1" ).arg ( oidValue ) );
31463147
31473148 // compare the two oid values to determine if we need to do an endian swap
3148- if ( oid = = oidValue.toLongLong () )
3149+ if ( oid ! = oidValue.toLongLong () )
31493150 swapEndian = false ;
31503151 }
31513152 connectionRO->closeCursor ( " oidcursor" );
0 commit comments