Skip to content

Commit

Permalink
Do not consider a tuple response as an error in transaction
Browse files Browse the repository at this point in the history
  • Loading branch information
pblottiere committed Nov 16, 2017
1 parent 8dd70c1 commit 640f78e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/providers/postgres/qgspostgrestransaction.cpp
Expand Up @@ -74,7 +74,8 @@ bool QgsPostgresTransaction::executeSql( const QString &sql, QString &errorMsg,
mConn->lock();
QgsPostgresResult r( mConn->PQexec( sql, true ) );
mConn->unlock();
if ( r.PQresultStatus() != PGRES_COMMAND_OK )
if ( r.PQresultStatus() == PGRES_BAD_RESPONSE ||
r.PQresultStatus() == PGRES_FATAL_ERROR )
{
errorMsg = QStringLiteral( "Status %1 (%2)" ).arg( r.PQresultStatus() ).arg( r.PQresultErrorMessage() );
QgsDebugMsg( errorMsg );
Expand Down

0 comments on commit 640f78e

Please sign in to comment.