From 7b51842728b6ee99945afe401fca317c703a12d9 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 16 Jun 2021 11:28:56 +0200 Subject: Add support for bulk operations using pipeline mode in libpq 14 --- odb/pgsql/database.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'odb/pgsql/database.cxx') 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 (name.c_str ())}; size_t psize[1] = {name.size ()}; bool pnull[1] = {false}; bind pbind[1] = {{bind::text, - const_cast (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 (table)}; size_t psize[1] = {strlen (table)}; bool pnull[1] = {false}; bind pbind[1] = {{bind::text, - const_cast (table), + &pbuf[0], &psize[0], psize[0], &pnull[0], -- cgit v1.1