Skip to content

libpqxx 7.8.0: massive feature release

Compare
Choose a tag to compare
@jtv jtv released this 23 Jul 22:23
· 157 commits to master since this release
fdb3e0f

Welcome to libpqxx 7.8.0. Lots of goodies for you. Probably enough that I could have called it 8.0 — except libpqxx 8.0 is going to require C++20. For now you're still fine with C++17.

In 7.8 you get, among other things:

  • Streaming large data sets now benchmarks faster than similar C/libpq code!
  • New array class for easier parsing of SQL arrays.
  • Deprecating stream_from. Use transaction_base::stream().
  • Use array_parser only on comma-separated types, i.e. most of them. (#590)
  • Bumping requirements versions: need postgres 10.
  • Fix array_parser bug when parsing semicolon in an unquoted string.
  • Make some zview constructors noexcept if string_view does it.
  • Handle result status code for starting streaming replication. (#631)
  • Faster text decoding and escaping in data streaming. (#601)
  • Deprecate basic_fieldstream and fieldstream.
  • Deprecate << operator inserting a field into an ostream.
  • New string conversion fields: converts_to_string & converts_from_string.
  • Support std::optional<std::string_view> etc. in stream_to. (#596)
  • Remove support for single-quoted array/composite elements. No such thing!
  • Work around build warning in MinGW: include winsock2.h before windows.h.
  • If CMake can't find libpq, fall back to pkg-config. (#664)
  • Work around spurious compile error on g++ pre-gcc-10. (#665)
  • Include <pqxx/range> and <pqxx/time> headers in <pqxx/pqxx>. (#667)
  • Don't use std::function as deleter for smart pointers.
  • Work around gcc compile error with regex + address sanitizer + analyzers.
  • Fix "double free" on exit when built as shared library on Debian. (#681)
  • Stop including <ciso646>; should be built into compilers. (#680)
  • New broken_connection exception subclass: protocol_violation. (#686)
  • Retired unused blob_already_exists exception class. (#686)
  • Support for PQinitOpenSSL(). (#678)
  • Slightly more helpful error for unsupported conversions. (#695)
  • Replace some C++ feature tests with C++20 feature macros.
  • Support moving of stream_to. (#706)
  • Incorporate source_location in exceptions.

There were some other small tweaks as well. If you implement the text conversions for your own types, there are two new fields that your string_traits specialisation: converts_to_string and converts_from_string. These are booleans that should say whether the string_traits class implements conversion, respectively, from the type to a string; and from a string to the type.

Enjoy this one! I'm sure somebody will find a problem, with so many changes, in which case we'll to a 7.8.1 soon.