Releases: jtv/libpqxx
6.4.5: Build fix for statement parameters
This is a minor update to 6.4, the current stable release. It fixes the handling of const
in smart-pointer-like arguments to prepared/parameterised statements.
6.3.4: Build fix for statement parameters
This is a minor update to 6.3, the previous stable release. It fixes the handling of const
in smart-pointer-like arguments to prepared/parameterised statements.
6.4.4: Build improvements
Fixes some puzzling CMake build errors. Turns out the problem was, sometimes there are still autoconf-generated config headers in the source tree, and the CMake build would prefer those over the ones which CMake itself had generated in the binary tree. Bad things would happen if the two contained incompatible configuration.
Also, uses pkg-config
if the pg_config
script is not available. Expect pkg-config
to become the default over time.
6.4.3: Install new stream headers
This release fixes two omissions with the new stream_from
and stream_to
headers:
- The native automake-based build did not include them in the install.
- They were not included in the
pqxx/pqxx
header.
The old tablereader
and tablewriter
headers are no longer included from pqxx/pqxx
. They're still there, but you won't automatically include them when you include pqxx/pqxx
. The stream_from
/stream_to
headers replace the tablereader
/tablewriter
ones, and the old headers will be gone completely in 7.0.
6.4.2: Fix the fix.
Well, that fix for a memory leak in 6.4.1 wasn't quite perfect. Yes, the memory got freed. But not in quite the right way for Windows, where you can't allocate memory in one DLL (in this case libpq) and free it in another (here, libpqxx). If you are using Windows, unescaping binary data in 6.4.1 will probably crash, and 6.4.2 should fix it. If you are not on Windows, or are not calling esc_raw
, you shouldn't notice any difference.
Thanks @egorpugin for spotting the problem and pointing it out so quickly!
6.4.1: Memory bugs fixed
It's been ages since I ran libpqxx through some solid memory checking tools. In this case, I enabled all gcc instrumentation I could find, and it turned up a few small leaks and a use-after-free!
Those are fixed now, so I recommend that you upgrade.
6.4.0: Object lifetime bug fixed
This release addresses (but does not fully prevent) a subtle lifetime bug. Due to an unexpected subtlety in how libpq and libpqxx interact, an application would access invalid memory if the following things all happened together:
- The application receives a
result
object from a connection. - It destroys the connection, but keeps the
result
. - And, it continues using the
result
. - Then, it does something on the
result
which causes the underlying C driver, libpq, to issue an error or warning message.
Today's update can't prevent this, but it further limits the circumstances under which this can happen. Now, the bug will only happen if the connection has an errorhandler
registered on it at the time it produces the result
.
Documentation has been updated to mention this as a hazard of registering an error handler. If you need to register an errorhandler
on a connection, you will need to keep the connection object alive until you stop using the result
you got from that connection.
6.3.3: Just a little more of the same.
Another exception change: if a connection's client encoding can't be read, the attempt will throw an exception.
Also, a few more CMake build problems are fixed.
6.3.2: Fixes but also some real changes
It's mostly small fixes, but some of these changes may affect your application. So test carefully.
- Conversion errors no longer throw
pqxx::failure
; alwaysconversion_error
! - Use C++17's built-in numeric string conversions, if available.
- Query numeric precision in a more sensible, standard way.
- Avoid "dead code" warning.
- Replace obsolete autoconf macros.
- Remove all
using namespace std
. - CMake build fixes.
6.3.1: Windows compile fixes
This is a minor update to 6.3.0, fixing a few build problems on Windows.
See the 6.3.0 release for the really interesting stuff!