Skip to content
Permalink
Browse files

Do not consider a tuple response as an error in transaction

  • Loading branch information
pblottiere committed Nov 16, 2017
1 parent 8dd70c1 commit 640f78e5dfc5a9e08e78b8f7cb847ae29428237c
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/providers/postgres/qgspostgrestransaction.cpp
@@ -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 );

0 comments on commit 640f78e

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