Skip to content

Reference

Every module’s interface, generated by odoc from its .mli, where each function says what it does, what it refuses and what it defaults to.

Package Libraries What it is
postgres-eio postgres-eio The driver: connections, the pool, connection strings, and cell values

A dune file names the library as it is installed (postgres-eio); OCaml code names it as a module (Postgres_eio).

  • Postgres_eio – connections: connecting, statements, COPY, the session, and notifications. Within it, Pipeline, Listener and Resolver.
  • Pool – a fixed-size pool that lends every connection in a clean state.
  • Conninfo – connection strings, the PG* variables and .pgpass.
  • Server_error – a server’s error, every field of it.
  • Tag – a statement’s command tag.

The lower layers do no IO and can be used alone:

  • Text – values written as Postgres reads them, and read as it writes them.
  • Value – cells decoded alike from text and binary results.
  • Column – a result’s column, as the server describes it.
  • Oid – the identifier of a type, or another row of a system catalogue.
  • Interval – an interval, its months, days and microseconds kept apart.