This page in other versions: 9.1 / 9.2 / 9.3 / 9.4 / current (9.5)  |  Development versions: devel  |  Unsupported versions: 8.2 / 8.3 / 8.4 / 9.0

G.1. Client Interfaces

There are only two client interfaces included in the base PostgreSQL distribution:

  • libpq is included because it is the primary C language interface, and because many other client interfaces are built on top of it.

  • ecpg is included because it depends on the server-side SQL grammar, and is therefore sensitive to changes in PostgreSQL itself.

All other language interfaces are external projects and are distributed separately. Table G-1 includes a list of some of these projects. Note that some of these packages might not be released under the same license as PostgreSQL. For more information on each language interface, including licensing terms, refer to its website and documentation.

Table G-1. Externally Maintained Client Interfaces

Name Language Comments Website
DBD::Pg Perl Perl DBI driver
JDBC JDBC Type 4 JDBC driver
libpqxx C++ New-style C++ interface
Npgsql .NET .NET data provider
pgtclng Tcl
psqlODBC ODBC ODBC driver
psycopg Python DB API 2.0-compliant


Feb. 6, 2010, 6:23 p.m.

For OCaml, you essentially have two bindings. One called postgresql-ocaml, which is a direct binding of the libpq C library. The other, PG'OCaml, is rather peculiar in the sense that the typing in the PostgreSQL database is imported to the OCaml type system when compiling your linked code. It is a bit less flexible, but it has the advantage of enforcing the typing consistency between your program and the database. That will prevent any runtime errors if the database schema changes.

Privacy Policy | About PostgreSQL
Copyright © 1996-2016 The PostgreSQL Global Development Group