Skip to content

Releases: jtv/libpqxx

Birthday release: libpqxx turns 18!

22 Sep 18:47
@jtv jtv
Compare
Choose a tag to compare

Today marks 18 years since my initial commit in libpqxx's original CVS repo. This library is now officially a grownup.

Changes:

  • Removed deprecated pqxx-config.
  • Build fix on Visual C++ when not defining NOMINMAX.
  • Reduce setup code for string conversions, hopefully improving speed.
  • Allow nul bytes in tablereader.
  • Support defining string conversions for enum types.
  • Fixed const/pure attributes warning in gcc 8.
  • Updated build documentation to mention CMake option.

6.2.4: Build fixes

31 May 13:02
@jtv jtv
Compare
Choose a tag to compare

The build machinery now tries to cope with non-ASCII characters in paths. It's not perfect, because filesystem paths are raw bytes — it may still break if those raw bytes fail to decode to Unicode characters.

If your application's build breaks with an error about std::experimental not existing, try defining the new macro PQXX_HIDE_EXP_OPTIONAL. It will suppress libpqxx support for std::experimental::optional. This can be needed if your copy of libpqxx was built in a compiler environment which had that template, and your application is being built in an environment which does not.

6.2.3: build fixes

04 May 20:53
@jtv jtv
Compare
Choose a tag to compare

Thanks to all the people who contributed fixes and improvements!

Small fixes

15 Mar 09:18
@jtv jtv
Compare
Choose a tag to compare

Now that we're on github, libpqxx is getting a lot more scrutiny. Thanks to all those who submitted bugs and fixes!

This update mostly addresses compile issues, but also one actual bug: in some circumstances an error string would be left empty.

Array parsing, and bug fixes.

16 Feb 12:36
@jtv jtv
Compare
Choose a tag to compare

Adds a first-generation parser for SQL arrays. We'll want to improve on this later. See the pqxx/array header.

This release also fixes some bugs which would break builds under specific circumstances — in some cases builds of the library, in other cases builds of client software. So, if you had trouble compiling with 6.0, try 6.1.

Dependencies between library headers have changed. It's possible that some code may need an extra #include here or there, if your code implicitly relied on some libpqxx headers including other libpqxx headers.

Smaller, modernised, all-C++11 libpqxx

25 Dec 11:29
@jtv jtv
Compare
Choose a tag to compare

This is a major overhaul. Changes are everywhere:

  • C++11 is now required. Your compiler must have shared_ptr, noexcept, etc.
  • Removed configure.ac.in; we now use configure.ac directly.
  • Removed pqxx::items. Use the new C++11 initialiser syntax.
  • Removed maketemporary. We weren't using it.
  • Can now be built outside the source tree.
  • New, simpler, lambda-friendly transactor framework.
  • New, simpler, prepared statements and parameterised statements.
  • Result rows can be passed around independently.
  • New exec0(): perform query, expect zero rows of data.
  • New exec1(): perform query, expect (and return) a single row of data.
  • New exec_n(): perform query, expect exactly n rows of data.
  • No longer defines Visual Studio's NOMINMAX in headers.
  • Much faster configure script.
  • Most configuration items are gone.
  • Retired all existing capability flags.
  • Uses WSAPoll() on Windows.
  • Documentation on readthedocs.org, thanks Tim Sheerman-Chase.

Most old code should still compile against the new library, but you may find incompatibilities in uncommon usage.

Everything is more modern now. The code lives on GitHub (with automated test runs thanks to CircleCI), and documentation on ReadTheDocs. Release procedures were rigid and cumbersome and kept me from doing any releases at all; now they're light and fast again. I couldn't get access to the mailing lists, so I dropped them. A lot of workarounds for old compilers and postgres versions went out the window. As a result, the configure script runs in about as many seconds as it used to take minutes!

Adding exec1() functions (to execute a query that returns exactly 1 row) may seem like trivia. But it's actually a big deal. Everything had to move and change in very painful ways in order to make that possible! A row object now keeps its result object alive, so you no longer need a result somewhere in order to have a row variable. The same thing happened between fields and rows. The side effect is that the library is now cleaner, and easier to reason about. To me, looking at the inside, it's like the whole library is new again.

For you, I hope it will mainly be simpler. There's less crud. Prepared statements and parameterised statements no longer look like a clever hack. Builds are faster. It's harder to make subtle mistakes.

5.0.1

26 Feb 12:30
@jtv jtv
Compare
Choose a tag to compare

Expose SQLSTATE error codes in sql_error exceptions.