pig ext
The pig ext command is an all-in-one tool for managing PostgreSQL extensions. It lets you search, install, remove, update, and manage PostgreSQL extensions, and it can also handle PostgreSQL kernel packages.
| Command | Description | Notes |
|---|---|---|
ext list | Search extensions | |
ext info | Show extension details | |
ext avail | Show extension availability matrix | |
ext status | Show installed extensions | |
ext scan | Scan installed extensions | |
ext add | Install extensions | Requires sudo or root |
ext rm | Remove extensions | Requires sudo or root |
ext update | Update extensions | Requires sudo or root |
ext import | Download extensions for offline use | Requires sudo or root |
ext link | Link a PG version into PATH | Requires sudo or root |
ext reload | Refresh extension catalog |
Quick Start
Before installing PostgreSQL extensions, add the required repositories with pig repo add:
Then search and install PostgreSQL extensions:
See the extension list for available extensions and package names.
Notes:
- If no PostgreSQL version is specified, pig tries to detect the active PostgreSQL installation from
pg_configinPATH. - PostgreSQL can be selected by major version (
-v) or by pg_config path (-p).- With
-v, pig uses the default PGDG kernel package path for that major version.- EL distros:
/usr/pgsql-$v/bin/pg_config - DEB distros:
/usr/lib/postgresql/$v/bin/pg_config
- EL distros:
- With
-p, pig locates PostgreSQL directly from that path.
- With
- The extension manager automatically adapts to the OS package format:
- RPM packages for RHEL/CentOS/Rocky Linux/AlmaLinux
- DEB packages for Debian/Ubuntu
- Extension dependencies are resolved automatically when possible.
- Use
-ycarefully because it auto-confirms prompts.
Pigsty assumes official PGDG kernel packages are installed. If not, install them with:
ext list
List or search extensions in the extension catalog.
Category filtering is done by passing the category name as the query. Supported categories include: time, gis, rag, fts, olap, feat, lang, type, func, util, admin, stat, sec, fdw, sim, and etl.
Options:
-v|--version: filter by PG version--pkg: show package names instead of extension names, listing only leading extensions
Status column:
installed: extension is installedavailable: extension is available but not installednot avail: extension is not available on the current system
The default extension catalog is defined in cli/ext/assets/extension.csv.
Use pig ext reload to refresh to the latest catalog. The downloaded catalog is stored at ~/.pig/extension.csv; the latest online catalog is also published at pigsty.io/ext/data/extension.csv.
ext info
Show detailed information for selected extensions.
ext avail
Show the extension availability matrix across operating systems, architectures, and PostgreSQL versions.
The matrix shows availability across operating systems (EL8/9/10, Debian 12/13, Ubuntu 22/24/26), architectures (x86_64/aarch64), and PostgreSQL versions (14-18).
ext status
Show installed extension status for the current PostgreSQL instance.
Options:
-c|--contrib: include contrib extensions in the result
ext scan
Scan installed extensions for the current PostgreSQL instance.
This command scans the PostgreSQL extension directory and finds extensions that are actually installed.
ext add
Install one or more PostgreSQL extensions. Same-level aliases for pig ext add include pig ext install, pig ext ins, and pig ext a. The top-level pig install command is a separate native package-manager wrapper that also supports PostgreSQL and extension alias translation.
Options:
-v|--version: specify PG major version-y|--yes: auto-confirm installation--plan: preview the install plan without running package-manager commands
ext rm
Remove one or more PostgreSQL extensions.
Options:
-v|--version: specify PG major version-y|--yes: auto-confirm removal--plan: preview the remove plan without running package-manager commands
ext update
Update explicitly selected installed extensions to the latest version. For safety, pig ext update with no arguments is a no-op; you must name the targets explicitly.
Options:
-v|--version: specify PG major version-y|--yes: auto-confirm update-m|--mirror: prefer thepigsty.ccmirror as the update source
ext import
Download extension packages into a local repository for offline installation.
Options:
-d|--repo: local repository directory (default:/www/pigsty)
ext link
Link a selected PG version into the system PATH.
This command creates the /usr/pgsql symlink and writes /etc/profile.d/pgsql.sh.
ext reload
Refresh extension metadata.
The updated catalog is stored at ~/.pig/extension.csv.
Was this page helpful?
Thanks—your feedback helps us improve this page.
What got in the way? (optional)