Bitbucket is a code hosting site with unlimited public and private repositories. We're also free for small teams!


PostgreSQL-OCaml - PostgreSQL Bindings for OCaml

What is PostgreSQL-OCaml?

This OCaml-library provides an interface to PostgreSQL, an efficient and reliable, open source, relational database. Almost all functionality available through the C-API (libpq) is replicated in a type-safe way. This library uses objects for representing database connections and results of queries.


The OCaml-API in file lib/postgresql.mli is well-documented and can be built as HTML with make doc. The API-documentation can also be found online.

More detailed information on how to interact with PostgreSQL is available in the PostgreSQL-documentation. The OCaml-examples in the examples-directory are mostly very short and comprehensible and therefore a good way to get started.

Contact Information and Contributing

In the case of bugs, feature requests, contributions and similar, please contact the maintainers:

Up-to-date information should be available at:


Markus Mottl in Rutherford, NJ on July 10, 2012

Recent activity

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.