File tree Expand file tree Collapse file tree 1 file changed +11
-10
lines changed Expand file tree Collapse file tree 1 file changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -3228,25 +3228,26 @@ bool QgsPostgresProvider::Conn::PQexecNR( QString query )
3228
3228
return false ;
3229
3229
}
3230
3230
3231
- if ( PQresultStatus ( res ) == PGRES_COMMAND_OK )
3231
+ ExecStatusType errorStatus = PQresultStatus ( res );
3232
+ if ( errorStatus == PGRES_COMMAND_OK )
3232
3233
return true ;
3233
3234
3234
3235
#ifdef QGISDEBUG
3235
3236
QString err = QString ( " Query: %1 returned %2 [%3]" )
3236
- .arg ( query )
3237
- .arg ( errorStatus )
3238
- .arg ( QString::fromUtf8 ( PQresultErrorMessage ( res ) ) );
3237
+ .arg ( query )
3238
+ .arg ( errorStatus )
3239
+ .arg ( QString::fromUtf8 ( PQresultErrorMessage ( res ) ) );
3239
3240
QgsDebugMsg ( err );
3240
3241
#endif
3241
3242
if ( openCursors )
3242
3243
{
3243
3244
QgsPostgresProvider::showMessageBox (
3244
- tr ( " Query failed" ),
3245
- tr ( " %1 cursor states lost.\n SQL: %2\n Result: %3 (%4)" )
3246
- .arg ( openCursors )
3247
- .arg ( query )
3248
- .arg ( errorStatus )
3249
- .arg ( QString::fromUtf8 ( PQresultErrorMessage ( res ) ) ) );
3245
+ tr ( " Query failed" ),
3246
+ tr ( " %1 cursor states lost.\n SQL: %2\n Result: %3 (%4)" )
3247
+ .arg ( openCursors )
3248
+ .arg ( query )
3249
+ .arg ( errorStatus )
3250
+ .arg ( QString::fromUtf8 ( PQresultErrorMessage ( res ) ) ) );
3250
3251
openCursors = 0 ;
3251
3252
}
3252
3253
You can’t perform that action at this time.
0 commit comments