30th September 2021: PostgreSQL 14 Released!
Unsupported versions: 6.3
This documentation is for an unsupported version of PostgreSQL.
You may want to view the same page for the current version, or one of the other supported versions listed above instead.
Prev Next

Chapter 40. libpq

Table of Contents
Control and Initialization
Database Connection Functions
Query Execution Functions
Fast Path
Asynchronous Notification
Functions Associated with the COPY Command
libpq Tracing Functions
User Authentication Functions
Sample Programs

libpq is the application programming interface to Postgres. libpq is a set of library routines which allows client programs to pass queries to the Postgres backend server and to receive the results of these queries. This version of the documentation describes the C interface library. Three short programs are included at the end of this section to show how to write programs that use libpq. There are several examples of libpq applications in the following directories:


Frontend programs which use libpq must include the header file libpq-fe.h and must link with the libpq library.

Prev Home Next
Examples Up Control and Initialization