Chapter 10. The PostgreSQL C++ API—libpq++

You can build PostgreSQL client applications using a variety of programming languages. In Chapter 8, “The PostgreSQL C API—libpq (Client Applications),” and Chapter 9, “A Simpler C API—libpgeasy,” you looked at two of the APIs that you can conveniently use from a C program (libpq and libpgeasy). This chapter introduces you to the libpq++ API. libpq++ is an API designed for use from within a C++ client application. To demonstrate the capabilities provided by libpq++, you'll build a number of client applications in this chapter:

  • client1—A simple example that shows how to connect a C++ application to a PostgreSQL database.

  • client2—Next I'll show you how to catch runtime errors that might occur when you ...

Get PostgreSQL now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.