Skip to content

omni_httpd

HTTP server

omnigres · HTTP server

Overview

IDExtensionPackageVersionCategoryLicenseLanguage
2951omni_httpdomnigres0.4.11FEATApache-2.0C
AttributeHas BinaryHas LibraryNeed LoadHas DDLRelocatableTrusted
--s-d--NoYesNoYesnono

Packages

TypeRepoVersionPG Major CompatibilityPackage PatternDependencies
EXTPIGSTY0.4.1119 18 17 16 15omnigresomni_types, omni_http
RPMPIGSTY2026021219 18 17 16 15omnigres_$vpostgresql$v-contrib, postgresql$v-plpython3, python3-pip
DEBPIGSTY2026021219 18 17 16 15postgresql-$v-omnigrespostgresql-plpython3-$v, python3-pip
Linux / PGPG19PG18PG17PG16PG15
el8.x86_64N/APIGSTY 20260212PIGSTY 20260212PIGSTY 20260212PIGSTY 20260212
el8.aarch64N/APIGSTY 20260212PIGSTY 20260212PIGSTY 20260212PIGSTY 20260212
el9.x86_64N/APIGSTY 20260212PIGSTY 20260212PIGSTY 20260212PIGSTY 20260212
el9.aarch64N/APIGSTY 20260212PIGSTY 20260212PIGSTY 20260212PIGSTY 20260212
el10.x86_64N/APIGSTY 20260212PIGSTY 20260212PIGSTY 20260212PIGSTY 20260212
el10.aarch64N/APIGSTY 20260212PIGSTY 20260212PIGSTY 20260212PIGSTY 20260212
d12.x86_64N/APIGSTY 20260212PIGSTY 20260212PIGSTY 20260212PIGSTY 20260212
d12.aarch64N/APIGSTY 20260212PIGSTY 20260212PIGSTY 20260212PIGSTY 20260212
d13.x86_64N/APIGSTY 20260212PIGSTY 20260212PIGSTY 20260212PIGSTY 20260212
d13.aarch64N/APIGSTY 20260212PIGSTY 20260212PIGSTY 20260212PIGSTY 20260212
u22.x86_64N/APIGSTY 20260212PIGSTY 20260212PIGSTY 20260212PIGSTY 20260212
u22.aarch64N/APIGSTY 20260212PIGSTY 20260212PIGSTY 20260212PIGSTY 20260212
u24.x86_64N/APIGSTY 20260212PIGSTY 20260212PIGSTY 20260212PIGSTY 20260212
u24.aarch64N/APIGSTY 20260212PIGSTY 20260212PIGSTY 20260212PIGSTY 20260212
u26.x86_64N/APIGSTY 20260212PIGSTY 20260212PIGSTY 20260212PIGSTY 20260212
u26.aarch64N/APIGSTY 20260212PIGSTY 20260212PIGSTY 20260212PIGSTY 20260212

Source

pig build pkg omnigres;		# build rpm/deb

Install

Make sure PGDG and PIGSTY repo available:

pig repo add pgsql -u   # add both repo and update cache

Install this extension with pig:

pig install omnigres;		# install by package name
pig install omni_httpd;		# install by extension name

pig install omni_httpd -v 18;   # install for PG 18
pig install omni_httpd -v 17;   # install for PG 17
pig install omni_httpd -v 16;   # install for PG 16
pig install omni_httpd -v 15;   # install for PG 15

Create this extension with:

CREATE EXTENSION omni_httpd CASCADE; -- requires omni_types, omni_http

Usage

omni_httpd: HTTP server

The omni_httpd extension is an embedded HTTP server for PostgreSQL, allowing HTTP request handling in SQL.

Define a Handler

CREATE FUNCTION my_handler(request omni_httpd.http_request)
    RETURNS omni_httpd.http_outcome
    RETURN omni_httpd.http_response(body => request.headers::text);

Register a Route

INSERT INTO omni_httpd.urlpattern_router (match, handler)
VALUES (omni_httpd.urlpattern('/headers'), 'my_handler'::regproc);

Configuration

  • omni_httpd.http_workers – Number of HTTP workers (defaults to CPU count, respects max_worker_processes)
  • omni_httpd.temp_dir – Temporary directory for sockets (defaults to /tmp)

Control

SELECT omni_httpd.stop();   -- Stop the server
SELECT omni_httpd.start();  -- Start the server
-- Pass immediate => true for immediate execution without waiting for transaction commit

Key Types

  • omni_httpd.http_request – Request type with path, method, query_string, headers, body
  • omni_httpd.http_response – Response constructor
  • omni_httpd.http_outcome – Return type for handlers

Table reader