pig is a Go-based package manager built to tame Postgres and its extension ecosystem of 400+ extensions in one fell swoop. it piggyback your system’s native package manager (APT, YUM, DNF) and follow official PGDG packaging conventions to ensure a glitch-free fit and out-of-box experience.
With the latest v0.3 release, pig is now capable of building extensions, The new pig build
subcommand streamlines building over 400 PG extensions with just a few commands. What once required custom scripts for automation is now fully integrated, allowing quick setups for building extensions like toolchain, rust & pgrx. Even if your Linux distro isn't officially supported in the Pigsty Repo, you can still easily build RPM/DEB packages for yourselves.
bash
curl -fsSL https://repo.pigsty.io/pig | bash
pig repo add all -u # add all repos and update cache
pig ext install pg17 # install native PGDG PostgreSQL 17 kernels
pig ext install documentdb # install the documentdb extension (for current pg17)
To build extensions:
bash
curl https://repo.pigsty.cc/pig | bash # Install pig
pig build repo # Add upstream repositories
pig build tool # Install build tools
pig build rust # Configure Rust/PGRX toolchain (optional)
pig build spec # Download build specifications
pig build proxy # Configure proxy
pig build get citus # Download source tarball (take citus for example)
pig build ext citus # Build the extension from source (citus example)