diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2021-06-16 11:28:56 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2021-06-29 11:11:44 +0200 |
commit | 7b51842728b6ee99945afe401fca317c703a12d9 (patch) | |
tree | 7ed893517f793928679254a74cd7b28479556f4f /odb/pgsql/database.cxx | |
parent | c6019273a7564be9ed772d45aa95e09aaff37a23 (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.cxx | 6 |
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], |