# PG Extensions

> Get 437 extensions out-of-the-box
---

Pigsty allows you to harness the synergistic superpower of the PostgreSQL extensions ecosystem with three things:

- [**Catalog**](https://pgext.cloud/list) : Find the extension you need, with unparalleled 437 extensions included
- [**Repository**](https://pgext.cloud/repo) : Get pre-made RPM/DEB packages for 10 mainstream Linux OS
- [**Package Manager**](https://pgext.cloud/pig) : Install everything with a single command - `pig`

Also check our blog post: [PostgreSQL is eating the Database World](https://medium.com/@fengruohang/postgres-is-eating-the-database-world-157c204dcfc4)

[![ecosystem](/img/pigsty/ecosystem.gif)](https://medium.com/@fengruohang/postgres-is-eating-the-database-world-157c204dcfc4)

--------

## Extensions


<a   href="https://pgext.cloud/list/cate/#time" class="no-underline">TIME</a>
<a  href="https://pgext.cloud/list/cate/#gis" class="no-underline">GIS</a>
<a href="https://pgext.cloud/list/cate/#rag" class="no-underline">RAG</a>
<a  href="https://pgext.cloud/list/cate/#fts" class="no-underline">FTS</a>
<a    href="https://pgext.cloud/list/cate/#olap" class="no-underline">OLAP</a>
<a   href="https://pgext.cloud/list/cate/#feat" class="no-underline">FEAT</a>
<a   href="https://pgext.cloud/list/cate/#lang" class="no-underline">LANG</a>
<a   href="https://pgext.cloud/list/cate/#type" class="no-underline">TYPE</a><br />
<a  href="https://pgext.cloud/list/cate/#util" class="no-underline">UTIL</a>
<a   href="https://pgext.cloud/list/cate/#func" class="no-underline">FUNC</a>
<a   href="https://pgext.cloud/list/cate/#admin" class="no-underline">ADMIN</a>
<a  href="https://pgext.cloud/list/cate/#stat" class="no-underline">STAT</a>
<a    href="https://pgext.cloud/list/cate/#sec" class="no-underline">SEC</a>
<a   href="https://pgext.cloud/list/cate/#fdw" class="no-underline">FDW</a>
<a   href="https://pgext.cloud/list/cate/#sim" class="no-underline">SIM</a>
<a href="https://pgext.cloud/list/cate/#etl" class="no-underline">ETL</a>

| Category | Count | Description |
|:---------|:-----:|:------------|
| <a href="https://pgext.cloud/list/cate/#time" class="no-underline">TIME</a> | 11 | TimescaleDB, Versioning & Temporal Table, Crontab, Async & Background Job Scheduler |
| <a href="https://pgext.cloud/list/cate/#gis" class="no-underline">GIS</a> | 20 | GeoSpatial Data Types, Operators, and Indexes, Hexagonal Indexing, OGR Data FDW, GeoIP & MobilityDB |
| <a href="https://pgext.cloud/list/cate/#rag" class="no-underline">RAG</a> | 10 | Vector Database with IVFFLAT, HNSW, DiskANN Indexes, AI & ML in SQL interface, Similarity Funcs |
| <a href="https://pgext.cloud/list/cate/#fts" class="no-underline">FTS</a> | 20 | ElasticSearch Alternative with BM25, 2-gram/3-gram Fuzzy Search, Zhparser & Hunspell Segregation Dicts |
| <a href="https://pgext.cloud/list/cate/#olap" class="no-underline">OLAP</a> | 13 | DuckDB Integration with FDW & PG Lakehouse, Access Parquet from File/S3, Sharding with Citus/Partman/PlProxy |
| <a href="https://pgext.cloud/list/cate/#feat" class="no-underline">FEAT</a> | 56 | OpenCypher with AGE, GraphQL, JsonSchema, Hints & Hypo Index, HLL, Rum, IVM, ChemRDKit, and Message Queues |
| <a href="https://pgext.cloud/list/cate/#lang" class="no-underline">LANG</a> | 31 | Develop, Test, Package, and Deliver Stored Procedures written in various PL/Languages: Java, Js, Lua, R, Sh, PRQL |
| <a href="https://pgext.cloud/list/cate/#type" class="no-underline">TYPE</a> | 37 | Dedicate New Data Types Like: prefix, sember, uint, SIUnit, RoaringBitmap, Rational, Sphere, Hash, RRule |
| <a href="https://pgext.cloud/list/cate/#util" class="no-underline">UTIL</a> | 31 | Utilities such as send http request, perform gzip/zstd compress, send mails, Regex, ICU, encoding, docs, Encryption |
| <a href="https://pgext.cloud/list/cate/#func" class="no-underline">FUNC</a> | 43 | Function such as id generator, aggregations, sketches, vector functions, mathematical functions and digest functions |
| <a href="https://pgext.cloud/list/cate/#admin" class="no-underline">ADMIN</a> | 36 | Utilities for Bloat Control, DirtyRead, BufferInspect, DDL Generate, ChecksumVerify, Permission, Priority, Catalog |
| <a href="https://pgext.cloud/list/cate/#stat" class="no-underline">STAT</a> | 34 | Observability Catalogs, Monitoring Metrics & Views, Statistics, Query Plans, WaitSampling, SlowLogs |
| <a href="https://pgext.cloud/list/cate/#sec" class="no-underline">SEC</a> | 26 | Auditing Logs, Enforce Passwords, Keep Secrets, TDE, SM Algorithm, Login Hooks, Log Erros, Extension White List |
| <a href="https://pgext.cloud/list/cate/#fdw" class="no-underline">FDW</a> | 22 | Wrappers & Multicorn for FDW Development, Access other DBMS: MySQL, Mongo, SQLite, MSSQL, Oracle, HDFS, DB2 |
| <a href="https://pgext.cloud/list/cate/#sim" class="no-underline">SIM</a> | 16 | Protocol Simulation & heterogeneous DBMS Compatibility: Oracle, MSSQL, DB2, MySQL, Memcached, and Babelfish |
| <a href="https://pgext.cloud/list/cate/#etl" class="no-underline">ETL</a> | 17 | Logical Replication, Decoding, CDC in protobuf/JSON/Mongo format, Copy & Load & Compare Postgres Databases |


--------

## Repository

Pigsty has a repository that provides 200+ extra PostgreSQL extensions on 10 mainstream [Linux Distros](/docs/prepare/linux/).
It is designed to work together with the official PostgreSQL Global Development Group ([PGDG](https://www.postgresql.org/download/linux/)) repo.

You can enable the pigsty infra & pgsql repo with the [pig](https://pgext.cloud/pig) CLI tool, or add them manually to your system:

```bash tab="pig"
curl https://repo.pigsty.io/pig | bash      # download and install the pig CLI tool
pig repo add all -u                         # add linux, pgdg, pigsty repo and update cache
```
```bash tab="apt"
# Add Pigsty's GPG public key to your system keychain to verify package signatures
curl -fsSL https://repo.pigsty.io/key | sudo gpg --dearmor -o /etc/apt/keyrings/pigsty.gpg

# Get Debian distribution codename (distro_codename=jammy, focal, bullseye, bookworm), and write the corresponding upstream repository address to the APT List file
distro_codename=$(lsb_release -cs)
sudo tee /etc/apt/sources.list.d/pigsty-io.list > /dev/null <<EOF
deb [signed-by=/etc/apt/keyrings/pigsty.gpg] https://repo.pigsty.io/apt/infra generic main
deb [signed-by=/etc/apt/keyrings/pigsty.gpg] https://repo.pigsty.io/apt/pgsql/${distro_codename} ${distro_codename} main
EOF

# Refresh APT repository cache
sudo apt update
```
```bash tab="yum"
# Add Pigsty's GPG public key to your system keychain to verify package signatures
curl -fsSL https://repo.pigsty.io/key | sudo tee /etc/pki/rpm-gpg/RPM-GPG-KEY-pigsty >/dev/null

# Add Pigsty Repo definition files to /etc/yum.repos.d/ directory, including two repositories
sudo tee /etc/yum.repos.d/pigsty-io.repo > /dev/null <<-'EOF'
[pigsty-infra]
name=Pigsty Infra for $basearch
baseurl=https://repo.pigsty.io/yum/infra/$basearch
skip_if_unavailable = 1
enabled = 1
priority = 1
gpgcheck = 1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-pigsty
module_hotfixes=1

[pigsty-pgsql]
name=Pigsty PGSQL For el$releasever.$basearch
baseurl=https://repo.pigsty.io/yum/pgsql/el$releasever.$basearch
skip_if_unavailable = 1
enabled = 1
priority = 1
gpgcheck = 1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-pigsty
module_hotfixes=1
EOF

# Refresh YUM/DNF repository cache
sudo yum makecache;
```

All the RPM / DEB packages are signed with [GPG Key](https://pgext.cloud/repo/gpg) fingerprint (`B9BD8B20`) in Pigsty repository.


--------

## Package Manager

"Postgres Install Genius, the missing extension package manager for PostgreSQL ecosystem"

[Get started](https://pgext.cloud/pig/start) with PIG in seconds:

```bash tab="default"
curl -fsSL https://repo.pigsty.io/pig | bash
```
```bash tab="mirror"
curl -fsSL https://repo.pigsty.cc/pig | bash
```

Then it’s ready to use, assume you want to install the [**`pg_duckdb`**](https://pgext.cloud/e/pg_duckdb/) extension:

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