33. libpq - C Library1
Table of Contents
libpqis theCapplication programmer's interface toPostgreSQL.libpqis a set of library functions that allow client programs to pass queries to thePostgreSQLbackend server and to receive the results of these queries.
libpqis also the underlying engine for several otherPostgreSQLapplication interfaces, including those written for C++, Perl, Python, Tcl andECPG. So some aspects oflibpq's behavior will be important to you if you use one of those packages. In particular,Section 33.14,Section 33.15andSection 33.18describe behavior that is visible to the user of any application that useslibpq.
Some short programs are included at the end of this chapter (Section 33.21) to show how to write programs that uselibpq. There are also several complete examples oflibpqapplications in the directory
src/test/examplesin the source code distribution.
Client programs that uselibpqmust include the header file
libpq-fe.hand must link with thelibpqlibrary.