Chapter 9. A Simpler C API—libpgeasy

The libpq library is very powerful. In fact, libpq is the basis for most of the other PostgreSQL APIs—the other APIs translate a high-level request into a set of calls to the libpq library. The power behind libpq comes at the price of complexity. libpgeasy lets you avoid that complexity by acting as a lightweight wrapper around the more commonly used libpq functions. The simplicity afforded by the use of libpgeasy often comes at the expense of functionality.

The functions provided by the libpgeasy library use the same data structures used by libpq. For example, when you connect to a database using libpgeasy, you get back a PGconn * ; that's the same data type that you get when you connect to a database using ...

Get PostgreSQL now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.