Skip to content

Commit 640f78e

Browse files
committedNov 16, 2017
Do not consider a tuple response as an error in transaction
1 parent 8dd70c1 commit 640f78e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎src/providers/postgres/qgspostgrestransaction.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ bool QgsPostgresTransaction::executeSql( const QString &sql, QString &errorMsg,
7474
mConn->lock();
7575
QgsPostgresResult r( mConn->PQexec( sql, true ) );
7676
mConn->unlock();
77-
if ( r.PQresultStatus() != PGRES_COMMAND_OK )
77+
if ( r.PQresultStatus() == PGRES_BAD_RESPONSE ||
78+
r.PQresultStatus() == PGRES_FATAL_ERROR )
7879
{
7980
errorMsg = QStringLiteral( "Status %1 (%2)" ).arg( r.PQresultStatus() ).arg( r.PQresultErrorMessage() );
8081
QgsDebugMsg( errorMsg );

0 commit comments

Comments
 (0)
Please sign in to comment.