Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I'm confused between these two. I see libpq++ mentioned for version 7 of posgresql; I see libpqxx describe itself as the official c++ postgresql interface but not mentioned in the docs for postgres 9.3, only the C interface (libpq) is mentioned in the postgresql docs for 9.3. I also see libpqxx hasn't been committed to for 5 months, and I don't seem able to be able to find a site for libpq++.

Which is the official interface for c++?

like image 657
user3791372 Avatar asked Aug 06 '14 04:08

user3791372


2 Answers

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

like image 166
Jorgeejgonzalez Avatar answered Oct 19 '22 12:10

Jorgeejgonzalez


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.

like image 4
Ivan Talalaev Avatar answered Oct 19 '22 11:10

Ivan Talalaev