comparison Framework/PostgreSQL/PostgreSQLStatement.cpp @ 234:d1b124d116c1

PostgreSQL index plugin handles retries for collisions between multiple writers
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 08 Apr 2021 10:50:01 +0200
parents ab96698c73a3
children f2b32d31fc99
comparison
equal deleted inserted replaced
233:7d46c99523a2 234:d1b124d116c1
276 &inputs_->GetSizes()[0], 276 &inputs_->GetSizes()[0],
277 &binary_[0], 277 &binary_[0],
278 1); 278 1);
279 } 279 }
280 280
281 if (result == NULL) 281 if (PQtransactionStatus(reinterpret_cast<PGconn*>(database_.pg_)) == PQTRANS_INERROR)
282 {
283 if (result != NULL)
284 {
285 PQclear(result);
286 }
287
288 throw Orthanc::OrthancException(Orthanc::ErrorCode_DatabaseCannotSerialize);
289 }
290 else if (result == NULL)
282 { 291 {
283 database_.ThrowException(true); 292 database_.ThrowException(true);
284 } 293 }
285 294
286 return result; 295 return result;