aboutsummaryrefslogtreecommitdiff
path: root/odb/pgsql/database.cxx
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/database.cxx
parentc6019273a7564be9ed772d45aa95e09aaff37a23 (diff)
Add support for bulk operations using pipeline mode in libpq 14
Diffstat (limited to 'odb/pgsql/database.cxx')
-rw-r--r--odb/pgsql/database.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/odb/pgsql/database.cxx b/odb/pgsql/database.cxx
index b4d3732..09bf6f0 100644
--- a/odb/pgsql/database.cxx
+++ b/odb/pgsql/database.cxx
@@ -249,10 +249,11 @@ namespace odb
// Bind parameters and results.
//
+ char* pbuf[1] = {const_cast<char*> (name.c_str ())};
size_t psize[1] = {name.size ()};
bool pnull[1] = {false};
bind pbind[1] = {{bind::text,
- const_cast<char*> (name.c_str ()),
+ &pbuf[0],
&psize[0],
psize[0],
&pnull[0],
@@ -302,10 +303,11 @@ namespace odb
bool exists (true);
if (cp == 0 && c.server_version () >= 90400)
{
+ char* pbuf[1] = {const_cast<char*> (table)};
size_t psize[1] = {strlen (table)};
bool pnull[1] = {false};
bind pbind[1] = {{bind::text,
- const_cast<char*> (table),
+ &pbuf[0],
&psize[0],
psize[0],
&pnull[0],