pg_http
alohadb · AlohaDB synchronous plain-HTTP client functions
Overview
PostgreSQL · 18
Usage
Sources:
pg_http 1.0 is AlohaDB’s synchronous HTTP client. It is distinct from the http extension distributed as pg_http by pgsql-http; their shared public function names may conflict.
These are preview modules of AlohaDB 21.2.0, a PostgreSQL 18 fork. Compatibility with stock PostgreSQL is not established.
Enable and Call
A superuser installs the extension in the fixed public schema. Requests are disabled by default; the superuser-settable pg_http.enabled must be enabled explicitly. No preload or restart is required.
http_get, http_post, http_put, http_delete and http_request return status, JSONB headers and a text body. The default timeout is 30000 ms, capped by pg_http.max_timeout_ms; the administrator may configure the cap from 1000 to 300000 ms. Calls block the backend until completion or error.
Network Boundary
The reviewed raw-socket client supports plain HTTP only and explicitly rejects HTTPS, despite HTTPS URLs in the top-level README. There is no verified URL/destination allowlist. Restrict SQL EXECUTE grants and network egress, use trusted destinations, and avoid placing secrets in cleartext requests. External effects are not rolled back with the SQL transaction; do not treat a trigger call as transactional delivery.
This module was formerly named alohadb_http. Use AlohaDB’s matching files and conversion procedure; it is not a drop-in replacement for pgsql-http.