Is libpq++ or libpqxx the official c++ postgres interface?

I just wrote up the story from my perspective, in the libpqxx FAQ.

There are alternatives to libpqxx, but forget about libpq++. At the turn of the century it really needed replacing. If I remember correctly after more than 20 years, it did weird things like "transaction is a subclass of connection" and "transaction destructor implicitly commits, even when you're exiting with an exception." I wrote libpqxx because I could practically hear the problem say "I want to be solved differently!" :-D


Just to put my two cents. There is a statement by the author of libpqxx library Jeroen T. Vermeulen:

The first version of libpqxx was written in 2001, and it was adopted as the official replacement for the older libpq++ a few years later.

So for now libpqxx is really best option to use c++ with PostgreSQL.


It seems to me that there isn't an official interface for c++, they just provide libpq as the c base and hope for the community to implement it for c++(hence libpqxx and libpq++)

For more info you could check http://www.postgresql.org/docs/current/static/libpq.html