hypopg

HypoPG is a PostgreSQL extension adding support for hypothetical indexes.

An hypothetical — or virtual — index is an index that doesn’t really exists, and thus doesn’t cost CPU, disk or any resource to create. They’re useful to know if specific indexes can increase performance for problematic queries, since you can know if PostgreSQL will use these indexes or not without having to spend resources to create them.

Managing

To install the extension you can create a migration with the following contents:

SQL
SET ROLE postgres;
CREATE EXTENSION hypopg;

To uninstall it, you can use the following migration:

SQL
SET ROLE postgres;
DROP EXTENSION hypopg;

Resources

http

HTTP client for PostgreSQL, retrieve a web page from inside the database.

Managing

To install the extension you can create a migration with the following contents:

SQL
SET ROLE postgres;
CREATE EXTENSION http;

To uninstall it, you can use the following migration:

SQL
SET ROLE postgres;
DROP EXTENSION http;

ip4r

IPv4/v6 and IPv4/v6 range index type for PostgreSQL.

Managing

To install the extension you can create a migration with the following contents:

SQL
SET ROLE postgres;
CREATE EXTENSION ip4r;

To uninstall it, you can use the following migration:

SQL
SET ROLE postgres;
DROP EXTENSION ip4r;

Resources

postgis

PostGIS extends the capabilities of the PostgreSQL relational database by adding support storing, indexing and querying geographic data.

Managing

To install the extension you can create a migration with the following contents:

SQL
SET ROLE postgres;
CREATE EXTENSION postgis;

To uninstall it, you can use the following migration:

SQL
SET ROLE postgres;
DROP EXTENSION postgis;

Resources

pgvector

Open-source vector similarity search for Postgres. Store your vectors with the rest of your data.

Supports:

  • exact and approximate nearest neighbor search
  • L2 distance, inner product, and cosine distance
  • any language with a Postgres client

Plus ACID compliance, point-in-time recovery, JOINs, and all of the other great features of Postgres

Managing

To install the extension you can create a migration with the following contents:

SQL
SET ROLE postgres;
CREATE EXTENSION vector;

To uninstall it, you can use the following migration:

SQL
SET ROLE postgres;
DROP EXTENSION vector;

Resources

pg_cron

pg_cron is a simple cron-based job scheduler for PostgreSQL (10 or higher) that runs inside the database as an extension. It uses the same syntax as regular cron, but it allows you to schedule PostgreSQL commands directly from the database. You can also use ‘[1-59] seconds’ to schedule a job based on an interval.

Managing

To install the extension you can create a migration with the following contents:

SQL
SET ROLE postgres;
CREATE EXTENSION pg_cron;

To uninstall it, you can use the following migration:

SQL
SET ROLE postgres;
DROP EXTENSION pg_cron;

Resources

pg_hashids

Hashids is a small open-source library that generates short, unique, non-sequential ids from numbers. It converts numbers like 347 into strings like “yr8”. You can also decode those ids back. This is useful in bundling several parameters into one or simply using them as short UIDs.

Managing

To install the extension you can create a migration with the following contents:

SQL
SET ROLE postgres;
CREATE EXTENSION pg_hashids;

To uninstall it, you can use the following migration:

SQL
SET ROLE postgres;
DROP EXTENSION pg_hashids;

Resources

pg_ivm

The pg_ivm module provides Incremental View Maintenance (IVM) feature for PostgreSQL.

Incremental View Maintenance (IVM) is a way to make materialized views up-to-date in which only incremental changes are computed and applied on views rather than recomputing the contents from scratch as REFRESH MATERIALIZED VIEW does. IVM can update materialized views more efficiently than recomputation when only small parts of the view are changed.

Managing

To install the extension you can create a migration with the following contents:

SQL
SET ROLE postgres;
CREATE EXTENSION pg_ivm;

To uninstall it, you can use the following migration:

SQL
SET ROLE postgres;
DROP EXTENSION pg_ivm;

Resources

pg_squeeze

PostgreSQL extension that removes unused space from a table and optionally sorts tuples according to particular index (as if CLUSTER command was executed concurrently with regular reads / writes). In fact we try to replace pg_repack extension.

Managing

To install the extension you can create a migration with the following contents:

SQL
SET ROLE postgres;
CREATE EXTENSION pg_squeeze;

In addition, you may need to configure the WAL level and replication slots. Check the official documentation for details.

To uninstall it, you can use the following migration:

SQL
SET ROLE postgres;
DROP EXTENSION pg_squeeze;

Resources

pg_stat_statements

The pg_stat_statements module provides a means for tracking planning and execution statistics of all SQL statements executed by a server.

Managing

To install the extension you can create a migration with the following contents:

SQL
SET ROLE postgres;
CREATE EXTENSION pg_stat_statements;

To uninstall it, you can use the following migration:

SQL
SET ROLE postgres;
DROP EXTENSION pg_stat_statements;

Resources

timescaledb

TimescaleDB is an open-source database designed to make SQL scalable for time-series data. It is engineered up from PostgreSQL and packaged as a PostgreSQL extension, providing automatic partitioning across time and space (partitioning key), as well as full SQL support.

Managing

To install the extension you can create a migration with the following contents:

SQL
SET ROLE postgres;
CREATE EXTENSION timescaledb;

SET ROLE postgres; CREATE EXTENSION timescaledb;

To uninstall it, you can use the following migration:

SQL
SET ROLE postgres;
DROP EXTENSION timescaledb;

Resources