Get Started

Get Started with pig, the PostgreSQL extension manager.

Short Version

Linux EL Support: 8/9 Debian Support: 12 Ubuntu Support: 22/24

Install the pig package first, (you can also use the apt / yum or just copy the binary)

curl -fsSL https://repo.pigsty.io/pig | bash

Then it’s ready to use, assume you want to install the pg_duckdb extension:

$ pig repo add pigsty pgdg -u  # add pgdg & pigsty repo, then update repo cache
$ pig ext install pg17         # install PostgreSQL 17 kernels with native PGDG packages
$ pig ext install pg_duckdb    # install the pg_duckdb extension (for current pg17)

That’s it, All set! Check the advanced usage for details and the full list 400+ available extensions.

asciicast


Installation

The pig util is a standalone go binary with no dependencies. You can install with the script:

curl -fsSL https://repo.pigsty.io/pig | bash   # cloudflare default
curl -fsSL https://repo.pigsty.cc/pig | bash   # mainland china mirror

Or just download and extract the binary, or use the apt/dnf package manager:

For Ubuntu 22.04 / 24.04 & Debian 12 or any compatible platforms:

sudo tee /etc/apt/sources.list.d/pigsty.list > /dev/null <<EOF
deb [trusted=yes] https://repo.pigsty.io/apt/infra generic main 
EOF
sudo apt update; sudo apt install -y pig

For EL 8/9 and compatible platforms:

sudo tee /etc/yum.repos.d/pigsty.repo > /dev/null <<-'EOF'
[pigsty-infra]
name=Pigsty Infra for $basearch
baseurl=https://repo.pigsty.io/yum/infra/$basearch
enabled = 1
gpgcheck = 0
module_hotfixes=1
EOF
sudo yum makecache; sudo yum install -y pig

For mainland china user: consider replace the repo.pigsty.io with repo.pigsty.cc

pig has self update feature, you can update pig itself to the latest version with:

pig update

Or if you only want to update the extension catalog, you can fetch the latest catalog with:

pig ext upgrade




Last modified 2025-02-23: update extension doc (ae76c50)