A user interacts with a PostgreSQL database by using an application, but how does an application interact with PostgreSQL? PostgreSQL provides a number of application programming interfaces (or APIs for short). Three of these APIs are designed to be used by applications written in C—libpq, libpgeasy, and ODBC. Each API has advantages and disadvantages. libpgeasy, for example, is very easy to use, but doesn't offer much flexibility. If your application uses the ODBC API, you gain portability at the cost of complexity.
Table 8.1 compares the three C-language APIs offered by PostgreSQL.
Table 8.1. Comparison of C Language APIs for PostgreSQL
Medium to high