Contents / Previous / Next


Programming Interfaces to SQL

PostgreSQL has interfaces for many programming languages.
Supported programming interfaces:


Interface Language Processing Advantages
LIBPQ  C compiled native interface
LIBPGEASY  C compiled simplified C
ECPG  C compiled ANSI embedded SQL C
LIBPQ++  C++ compiled object-oriented C
ODBC  ODBC compiled application connectivity
JDBC  Java both portability
PERL  Perl interpreted text processing
PGTCLSH TCL/TK  interpreted interfacing, windowing
PYTHON  Python interpreted object-oriented
PHP  HTML  interpreted dynamic Web pages

These language interfaces allow applications to pass queries to PostgreSQL and receive results.


libpq - C Library and libpq++ - C++ Binding Library

ibpq is the C application programmer's interface to PostgreSQL.
libpq is also the underlying engine for several other PostgreSQL application interfaces, including libpq++ (C++), libpgtcl (Tcl) and Perl.
libpq++ is the C++ API to PostgreSQL.

Perl

A Perl/DBI interface is available.
Perl is a good choice for writing scripts and small applications. It is popular for processing text files and generating dynamic Web pages using CGI (Common Gateway Interface).

Python

A Perl interface is available, the source code is located in pgsql/src/interfaces/python.
Python, an object-oriented scripting language, is considered to be a well-designed language, with code that is easy to read and maintain.

PHP

A PHP interface is available and can be downloaded from http://www.php.net
PHP is used for Web browser access to POSTGRESQL. With PHP, database commands can be embedded in Web pages. PHP must be recompiled to access POSTGRESQL.