PostgreSQL Extensibility

Inspired by bpanthi977’s note on the same topic.

Postgres is extensible via:

  1. ExtensionsCREATE EXTENSION pgvector;, postgis, pg_cron
  2. Foreign Data Wrappers (FDW) — query S3, MySQL as if tables
  3. Hooks & Pluginspl/pgsql, custom index methods

Example

CREATE EXTENSION vector;
CREATE TABLE items (id bigserial, embedding vector(1536));
CREATE INDEX ON items USING hnsw (embedding vector_l2_ops);

Links to vector-database.

Related: rate-limiter