Add a PostgreSQL extension to pgxman
Prerequisites
- Docker
Initialize an buildkit file
init
is interactive and will prompt you about the extension you wish to
create.
This result is a manifest file named extension.yaml
. The file serves as your
blueprint for building the extension.
Writing the buildkit file
Please refer to the full buildkit file specification for details. You’ll find a full documented example with all available fields, as well as documentation for the file. You can also review existing buildkits for examples on how to create a buildkit.
Most manifest files should follow the build instructions for the extension.
This may be as simple as make && make install
, but others may be considerably
more complicated. Review the documentation for the extension for build
instructions and any required dependencies.
Building the extension
Once you have a buildkit written, use pgxman to build the extension locally. pgxman uses Docker to build the packages.
This will package the extension files in the out
directory:
Test the extension
Our recommendation is to test the built extension using Docker. You could use a Dockerfile to build an image, or run the commands manually from inside of the container.
Below is an example Dockerfile. In order to use this, you’ll need your built
extension in out/
and a pgxman.yaml
file specifying the package from out/
to install.
Here’s an example pgxman.yaml
file for this setup:
Adding the extension to pgxman
Send a PR to pgxman/buildkit, adding your
buildkit to the buildkit
folder.