O
O
OrmaJever2015-11-12 14:48:31
PostgreSQL
OrmaJever, 2015-11-12 14:48:31

Driver for working with postgres in c++?

How to work with postgres in c++? From what I googled, they offer 2 options libpq++ and libpqxx, I didn’t even find the first one from where to download (source code or package), and generally no information on it, except for one page on the off site
, the second one is a little easier, said the source code, collected it, but how useful it was to look I didn’t understand the documentation, some strange class names, I didn’t find prepared statment.
I think there are people here who use postgres from the pros, what do you use and where can I download it?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
E
evnuh, 2015-11-12
@evnuh

The documentation is lame of course, but if you quickly look through all of it, everything will remain clear.
pqxx.org/devprojects/libpqxx/doc/4.0/html/Referenc...

O
Oleg Tsilyurik, 2015-11-12
@Olej

How to work with postgres in c++? From what I googled, they offer 2 options libpq++ and libpqxx,

I think that there are obviously more tools for working directly with PostgreSQL, given its widespread use, than you mentioned. Also, besides C++, look among C tools - a). there should be more of them, b). they are more reliable and run-in, c). they are just as applicable from your C++ code.
But there is another option ... I used it once in a project, quite a long time ago:
- install the UNIX ODBC interface for PostgreSQL ...
- work with the standard ODBC API ...
- which is exactly the same for most any database.
Of course, this is not suitable for highly loaded SQL queries if you are going to do serious optimizations, or use PostgreSQL specific features.
But in return you get versatility and portability.

A
Alexey, 2015-11-13
@MAKAPOH

See also SOCI .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question