aboutsummaryrefslogtreecommitdiff
path: root/odb/pgsql/error.ixx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2021-06-16 11:28:56 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2021-06-29 11:11:44 +0200
commit7b51842728b6ee99945afe401fca317c703a12d9 (patch)
tree7ed893517f793928679254a74cd7b28479556f4f /odb/pgsql/error.ixx
parentc6019273a7564be9ed772d45aa95e09aaff37a23 (diff)
Add support for bulk operations using pipeline mode in libpq 14
Diffstat (limited to 'odb/pgsql/error.ixx')
-rw-r--r--odb/pgsql/error.ixx14
1 files changed, 9 insertions, 5 deletions
diff --git a/odb/pgsql/error.ixx b/odb/pgsql/error.ixx
index 0cda31b..6a010aa 100644
--- a/odb/pgsql/error.ixx
+++ b/odb/pgsql/error.ixx
@@ -5,8 +5,8 @@ namespace odb
{
namespace pgsql
{
- bool
- inline is_good_result (PGresult* r, ExecStatusType* s)
+ inline bool
+ is_good_result (PGresult* r, ExecStatusType* s)
{
if (r != 0)
{
@@ -16,9 +16,13 @@ namespace odb
*s = status;
return
- status != PGRES_BAD_RESPONSE &&
- status != PGRES_NONFATAL_ERROR &&
- status != PGRES_FATAL_ERROR;
+ status != PGRES_BAD_RESPONSE
+ && status != PGRES_NONFATAL_ERROR
+ && status != PGRES_FATAL_ERROR
+#ifdef LIBPQ_HAS_PIPELINING
+ && status != PGRES_PIPELINE_ABORTED
+#endif
+ ;
}
return false;