EXPERIMENTAL AND INCOMPLETE
Build PostgreSQL extensions in OCaml.
-
The project uses ctypes with C stubs generation to interface with PostgreSQL/C API (both to use PostgreSQL/C API and to expose OCaml functions to PostgreSQL).
-
Library
pgo.api
provide bindings (type definitions and functions bindings) to PostgreSQL/C API. -
Library
pgo.fdw
sketches a harness for implementing FDW with OCaml. -
Library
example/fdw
implements an example FDW which exposes a single table.
-
Make sure you have opam and PostgreSQL installed.
-
Initialize opam switch:
make init
-
Build the project:
make build
-
Initialize the test database:
make test-db
-
Run
psql
shell within the test database with the example extension loaded:make psql