pg_pure - write PostgreSQL functions in Pure


Table of Contents

pg_pure - write PostgreSQL functions in Pure
Overview
Installation
The two languages and the trust model
Type mapping
Database access: the sql namespace
Set-returning functions
Triggers
DO blocks and procedures
Add-on Pure modules
The safe-mode security model
Performance
Limitations
Authors

pg_pure - write PostgreSQL functions in Pure

pg_pure makes Pure a procedural language in PostgreSQL, the way PL/Perl and PL/Python do for their languages. A function body is Pure code; it runs in a Pure interpreter (libpure) embedded in the backend process, and from there it can reach the database through SPI.

Pure is a functional language built on term rewriting: equational definitions with pattern matching, exact rational and arbitrary-precision arithmetic, lazy streams, and symbolic computation. Symbolic rewriting is the distinctive reason to reach for it in SQL; no other in-database language simplifies x*1 + 0*y to x.

One shared library (pg_pure.so) backs two SQL languages, following the PL/Perl plperl / plperlu model:

ExtensionTrustWho can use itStatus
pg_puretrustedany userworks; runs in a libpure safe-mode interpreter
pg_pureuuntrustedsuperuser onlyworks

They are separate extensions over one library, so a DBA can install either without the other:

CREATE EXTENSION pg_pureu;   -- untrusted, superuser only
CREATE EXTENSION pg_pure;    -- trusted, usable by any user

Caution

This module is under active development. The trusted language runs user bodies in a libpure safe-mode interpreter whose protection is a denylist (the section called “The safe-mode security model”); until an independent security review and a curated safe-mode prelude land (see ROADMAP.md), do not rely on pg_pure for untrusted multi-tenant workloads. The SQL interface may change between versions.

Overview

A Pure program can normally call any C function through an extern declaration, so untrusted Pure is as powerful as a C extension; only a superuser may create pg_pureu functions. The trusted pg_pure runs each function in a libpure safe-mode interpreter: a body that tries extern, inline C, eval / evalcmd, a native or non-allowlisted using, or a dangerous prelude function (exit, malloc, raw pointers) is refused as an SQL ERROR, and the backend is unharmed. So an unprivileged user can write pg_pure functions safely, the way PL/Perl's plperl is safe.

A function body is a single Pure expression, and the SQL argument names are its variables. Symbolic rewriting is available in SQL, here reducing an algebraic expression to a normal form. This example uses the untrusted language because it is written as a superuser example in the project sources; it does not reach the database and would run the same under pg_pure:

CREATE EXTENSION pg_pureu;

CREATE FUNCTION simplify(e text) RETURNS text LANGUAGE pg_pureu AS $$
  str (reduce (val e) with
         x*1 = x; 1*x = x; 0*x = 0; x*0 = 0; x+0 = x; 0+x = x
       end)
$$;

SELECT simplify('x*1 + 0*y + (x+0)');   -- x+x

Arbitrary-precision arithmetic, because Pure integers promote to bigints:

CREATE FUNCTION factorial(n int) RETURNS numeric LANGUAGE pg_pureu AS $$
  foldl (*) 1L (1..n)
$$;
SELECT factorial(30);   -- 265252859812191058636308480000000

Exact rationals (the math module, loaded by default, gives %):

CREATE FUNCTION harmonic(n int) RETURNS numeric LANGUAGE pg_pureu AS $$
  using math;
  foldl (+) 0 [1%k | k = 1..n]
$$;
SELECT harmonic(10);    -- 7381/2520 as an exact numeric: 2.9289682539...

Recursion and pattern matching in a local definition:

CREATE FUNCTION fib(n int) RETURNS numeric LANGUAGE pg_pureu AS $$
  loop n 0L 1L with loop 0 a _ = a; loop k a b = loop (k-1) b (a+b) end
$$;
SELECT fib(100);        -- 354224848179261915075

The feature set grew release by release: scalar functions and the sql namespace (0.1), the trusted language on libpure safe mode (0.2), float8[] matrices (0.3), a compiled Cholesky solve (0.4), parameterized SPI and the TAP suite (0.5), set-returning functions (0.6), bytea and domains (0.7), more vetted modules (0.8), a transparent SPI plan cache (0.9), sql::stream (0.10), and DML triggers (0.11). See CHANGELOG.md for the per-version detail and ROADMAP.md for what is deferred.

Installation

pg_pure needs PostgreSQL 17, 18 or 19 and libpure, built once from a fork of upstream Pure. libpure is not packaged by the distributions; you build and install it under a prefix, then build pg_pure against that prefix.

Building libpure (once).  pg_pure embeds libpure from a fork that makes the runtime safe to embed in a host process: it does not call exit(), it returns exceptions to the host, and it offers hooks for query-cancel and the stack limit. Build and install it from the libpure-embeddable branch:

git clone --branch libpure-embeddable https://github.com/gburd/pure-lang.git
cd pure-lang/pure
autoreconf -fi
./configure --prefix=$HOME/pure --with-tool-prefix=$(llvm-config --bindir) --enable-release
make -j
make install          # installs libpure.so + headers + the prelude under $HOME/pure

libpure needs LLVM (20.1 or newer; tested with 21) and GMP, MPFR and readline. On Debian: apt install llvm-21-dev clang-21 libgmp-dev libmpfr-dev libreadline-dev. The add-on Pure modules (the section called “Add-on Pure modules”) are built and installed alongside libpure by the same process; a Nix package (nix/flake.nix) builds libpure and the modules together.

Building and installing pg_pure.  PURE_PREFIX is the prefix where you installed libpure:

make PG_CONFIG=/path/to/pg_config PURE_PREFIX=$HOME/pure
sudo make install PG_CONFIG=/path/to/pg_config PURE_PREFIX=$HOME/pure

The prelude is found through libpure's built-in path; if the server runs with a non-standard install, set PURELIB in the server's environment to the directory that holds prelude.pure. Then, in a database:

CREATE EXTENSION pg_pureu;   -- or pg_pure

PostgreSQL JIT coexistence.  libpure JIT-compiles Pure with LLVM, and so does PostgreSQL's own JIT (llvmjit), often a different LLVM major. The fork's libpure hides its LLVM symbols so the two cannot clash, so nothing special is required: pg_pure runs on a normal jit = on server. This is tested with jit_above_cost = 0, which forces a JIT-compiled query into the same backend as a Pure function, on PostgreSQL 17, 18 and 19 with zero crashes. The TAP suite keeps a crash-matrix check so a future libpure that re-exported its LLVM symbols would be caught; see DESIGN.md section 5. If you deploy a libpure that does re-export them, a PostgreSQL built without LLVM (on Debian, with the postgresql-NN-jit package uninstalled) cannot clash: no backend loads libLLVM, and jit = on becomes a silent no-op.

Preloading (optional).  The interpreter is per backend, and the first call in a fresh backend pays a one-time LLVM codegen cost (the section called “Performance”). Preloading builds and warms the interpreter in the postmaster at startup:

# postgresql.conf
shared_preload_libraries = 'pg_pure'
pg_pure.using = 'math'      # modules every interpreter loads; default: math

This is the only configuration. pg_pure.using lists the modules every interpreter loads at creation; exact numeric needs math, which is why it is the default. A connection pooler, which keeps backends warm, is the way to amortize the first-call cost either way, since the interpreter is per backend.

The two languages and the trust model

pg_pureu is untrusted. A Pure program can call any C function through an extern declaration, run inline C (which invokes clang), eval arbitrary Pure, and using any file on disk, so untrusted Pure is as powerful as a C extension. Only a superuser may create pg_pureu functions, as with PL/Perl's plperlu.

pg_pure is trusted and usable by any user. It runs each function in a libpure safe-mode interpreter. The trusted and untrusted languages get separate backend-local interpreters: the untrusted one is created normally, the trusted one is created with libpure's --safe mode, has its SPI and notice bridge and the pg_pure.using modules set up while still unarmed, and is then armed. After arming, a body that uses any route out of the language is refused as an SQL ERROR (the section called “The safe-mode security model”).

A body is compiled as a single parenthesized expression. A body that tries to close that parenthesis and add a top-level definition is rejected at definition time, so one trusted function cannot leak interpreter state to the next in the same backend. The two interpreters never collide, because the function cache keys on the interpreter.

Type mapping

An SQL argument arrives as a Pure value and the function's result is converted back. Conversions never lose information silently: a value that does not fit its SQL type is an ERROR, not a wrong answer.

SQL typePure value passed inAccepted on return
int2, int4machine intint or bigint; out of range is an ERROR
int8bigint (5L)int or bigint; out of range is an ERROR
numericbigint if integral, else an exact rational (x%y); NaN and Infinity as doublesint, bigint, rational, double
float4, float8doubledouble, int, bigint, rational
bool1 or 0 (Pure's true and false)int; nonzero is true
text, varchar, char, namestring, converted to UTF-8strings only
float8[]a Pure double matrix (1-D → 1-by-n row vector, 2-D → n-by-m); no NULL elements, at most 2 dimensionsa double matrix (1-row → 1-D, else 2-D)
byteaa Pure int matrix (1-by-n) of byte values 0..255an int matrix; an element outside 0..255 is an ERROR
a domainits base type's Pure value; the CHECK is enforced on the argumentits base type; the domain CHECK runs on the result
NULLsql::nullsql::null
any other typeits text form, as a stringa string, passed to the type's input function

Three rules shape that table, and each surfaces a behavior a SQL author should know:

  • An unmatched application is not an error; it is a normal form. If your rules do not match the argument, Pure leaves the expression unevaluated (f 2 stays f 2) rather than failing. pg_pure cannot convert that to the return type, so it raises a clear ERROR with a hint to check the argument types your rules expect. The fix is almost always a catch-all rule (f _ = ...) or matching the right type.

  • SQL int2 / int4 are Pure machine integers, and they wrap silently. 2147483647 + 1 is -2147483648 inside Pure, as the Pure manual documents. The final result is range-checked when it is converted back (an out-of-range smallint is an error, not a wrong number), but a wrap inside the computation is not caught. For big intermediate values, work in int8 or numeric (Pure bigints) or convert with bigint x. A rule f 0 = ... fires for an int4 argument but not for an int8 one, because an int8 arrives as a bigint and 0L does not match the pattern 0; compare int8 with == or convert with int n when you know it fits.

  • A text result must be a Pure string. pg_pure will not stringify an arbitrary Pure value for you, because that would hide the unmatched-application error above as plausible but wrong text. Call str yourself if you mean to. A numeric is exact in and out: an integral numeric is a Pure bigint, a fractional one an exact rational (needs math, loaded by default), and a non-terminating rational returned as numeric is rounded to the display scale, as any numeric division is.

Numeric arrays map to Pure double matrices in both directions. A 1-D array is a row vector, a 2-D array an n-by-m matrix:

CREATE FUNCTION vscale(v float8[], k float8) RETURNS float8[]
  LANGUAGE pg_pure AS $$ map (*k) v $$;
SELECT vscale(ARRAY[1,2,3]::float8[], 10.0);       -- {10,20,30}

CREATE FUNCTION mtransp(m float8[]) RETURNS float8[]
  LANGUAGE pg_pure AS $$ using gsl::matrix; transpose m $$;
SELECT mtransp(ARRAY[[1,2,3],[4,5,6]]::float8[]);  -- {{1,4},{2,5},{3,6}}

A float8[] with a NULL element, or more than two dimensions, cannot become a dense Pure matrix and is rejected with a clear error.

bytea maps to a Pure int matrix of byte values, so arbitrary binary, embedded NUL included, round-trips, and a body can read or build the bytes:

CREATE FUNCTION bsum(x bytea) RETURNS int LANGUAGE pg_pureu AS
  $$ foldl (+) 0 (list x) $$;
SELECT bsum('\x010203'::bytea);     -- 6

CREATE FUNCTION bmk() RETURNS bytea LANGUAGE pg_pureu AS $$ {65,66,67} $$;
SELECT bmk();                        -- \x414243

A matrix element outside 0..255 is an ERROR, not a wrap.

A domain is accepted as its base type, with the CHECK enforced on the argument by PostgreSQL and on the result by pg_pure:

CREATE DOMAIN posint AS int4 CHECK (VALUE > 0);
CREATE FUNCTION pdomneg(x int4) RETURNS posint LANGUAGE pg_pureu AS
  $$ x - 100 $$;
SELECT pdomneg(150);    -- 50
SELECT pdomneg(1);      -- ERROR: result (1-100) violates posint

Database access: the sql namespace

Everything pg_pure adds to Pure lives in the sql namespace. A parameterized query or command passes its parameters to the planner as Datums via SPI_execute_with_args; the values are never spliced into the SQL text, so a value full of SQL metacharacters is just data, not an injection. Each parameter's SQL type is inferred from the Pure value (int → int8, double → float8, string → text, bigint → numeric, sql::null → a SQL NULL). Each sql::query and sql::exec runs in its own internal subtransaction, as in PL/Python: if the statement fails, that subtransaction is rolled back and the SQL error reaches Pure as sql::error "SQLSTATE" "message", which Pure can catch to continue, or let propagate to re-raise the original error intact.

sql::query q, sql::query (q, [p1, p2, ...]) → list of rows

Run a query and return its rows as a list. A row is a tuple of column values, and a one-column row is the bare value.

CREATE FUNCTION pparam(lo int) RETURNS int LANGUAGE pg_pureu AS $$
  foldl (+) 0 (sql::query ("SELECT k FROM t WHERE k >= $1", [lo]))
$$;
SELECT pparam(2);                       -- sum of the rows with k >= 2

sql::exec q, sql::exec (q, [p1, ...]) → number of rows processed

Run a command and return the number of rows processed. The parameter below carries SQL metacharacters and is still only data; the table survives:

CREATE FUNCTION pupd(nv text, kk int) RETURNS int LANGUAGE pg_pureu AS $$
  sql::exec ("UPDATE t SET v = $1 WHERE k = $2", [nv, kk])
$$;
SELECT pupd('ONE', 1);                  -- 1

sql::stream q, sql::stream (q, [p1, ...]) → a lazy list of rows

The lazy counterpart of sql::query: it opens an SPI cursor and returns an ordinary Pure lazy list that fetches the next batch of rows each time the list is forced further, so a body can reduce or take from a large result without building the whole list. Every list operation works, including foldl, take, a comprehension and a head:tail match.

CREATE FUNCTION ssum() RETURNS int LANGUAGE pg_pureu AS $$
  foldl (+) 0 (sql::stream "SELECT k FROM t")
$$;

A stream is valid only within the function call that opened it. When the call returns, pg_pure closes the cursor; a stream value forced after that (one a body tried to hand back) raises a sql::error, and the backend survives. Each force finds the cursor fresh by name and checks a per-call epoch, so there is no stored pointer to dangle. A holdable cursor that outlives the call is deferred (ROADMAP.md).

sql::notice msg, sql::warning msg → message to the client

Send a NOTICE or WARNING to the client:

CREATE FUNCTION psay(m text) RETURNS int LANGUAGE pg_pureu AS $$
  sql::notice m $$ 0
$$;
SELECT psay('hello from pure');

sql::null

SQL NULL, both as an argument and as a result. A body matches on it and produces it:

CREATE FUNCTION pnull(x int) RETURNS int LANGUAGE pg_pureu AS $$
  case x of sql::null = 0; _ = x+1 end
$$;
SELECT pnull(NULL), pnull(41);          -- 0, 42

sql::error sqlstate message

The exception an SQL error turns into. Catch it by SQLSTATE to continue the transaction, or throw it to raise that SQL error:

CREATE FUNCTION add_user(email text) RETURNS bool LANGUAGE pg_pureu AS $$
  catch dup (sql::exec ("INSERT INTO users(email) VALUES ($1)", [email]) > 0)
  with dup (sql::error "23505" _) = false; dup e = throw e end
$$;

A parameterized query is planned once and its plan reused across calls with the same text and the same inferred parameter types; the cache is transparent, per backend, and bounded, and PostgreSQL revalidates a saved plan on its own when a referenced object, the search path or the current role changes.

Set-returning functions

A function declared RETURNS SETOF of a scalar or float8[] produces one row per element of the Pure list its body yields. Rows are collected into a tuplestore, and each element is converted with the scalar range checks:

CREATE FUNCTION pupto(n int) RETURNS SETOF int LANGUAGE pg_pureu AS $$
  1..n
$$;
SELECT pupto(5);                 -- 1,2,3,4,5 as five rows
SELECT sum(x) FROM pupto(10) AS x;   -- 55

A lazy or infinite stream is walked one cons cell at a time, so a body that bounds the stream itself returns its rows without realizing the rest:

CREATE FUNCTION primes(n int) RETURNS SETOF int LANGUAGE pg_pureu AS $$
  take n (sieve (2..inf)) with
    sieve (p:qs) = p : sieve [q | q = qs; q mod p] &
  end
$$;
SELECT * FROM primes(10);        -- 2 3 5 7 11 13 17 19 23 29

Note

A set-returning function materializes all its rows before the executor applies LIMIT, so the body must bound the stream itself (take n ...). SELECT * FROM primes(10) LIMIT 4 still computes ten primes, and an unbounded body is stopped by cancel or a hard row cap, not by LIMIT. A CHECK_FOR_INTERRUPTS between rows keeps a long stream cancellable. RETURNS TABLE(...) and SETOF of a composite type are not yet supported; see ROADMAP.md.

Triggers

A RETURNS trigger function can back a DML trigger: BEFORE or AFTER, ROW or STATEMENT, on INSERT, UPDATE or DELETE, and TRUNCATE. The body sees three variables:

  • new and old are row records, or sql::null when the event has no such row. For INSERT, new is the row and old is sql::null; for DELETE, old is the row and new is sql::null; for UPDATE, new is the new row and old the pre-update row.

  • tg is a record describing the event, with the keys "name", "when", "level", "op", "table_name", "table_schema" and "args".

In a BEFORE-row trigger, returning a record makes it the stored row, and returning sql::null skips the operation, which is PostgreSQL's own convention. A returned record overrides only the columns it names; columns it omits keep the row's original value, as PL/Python does, so a body need not echo every column. PostgreSQL ignores the return value of AFTER and statement-level triggers.

CREATE FUNCTION fill_total() RETURNS trigger LANGUAGE pg_pureu AS $PURE$
  insert new ("total" => new!"qty" * new!"price")
$PURE$;
CREATE TRIGGER t_total BEFORE INSERT OR UPDATE ON line_item
  FOR EACH ROW EXECUTE FUNCTION fill_total();

The body above overrides only total; the other columns keep the values the statement supplied. A BEFORE-row body can skip a row by returning sql::null:

CREATE FUNCTION trg_reject() RETURNS trigger LANGUAGE pg_pureu AS $PURE$
  if new!"qty" > 100 then sql::null else new
$PURE$;
CREATE TRIGGER t_reject BEFORE INSERT ON trg_item
  FOR EACH ROW EXECUTE FUNCTION trg_reject();

Note

Event triggers and procedure transaction control (sql::commit, sql::rollback) are not supported; see ROADMAP.md.

DO blocks and procedures

An anonymous code block runs a Pure expression once:

DO LANGUAGE pg_pureu $$
  sql::exec "UPDATE line_item SET total = qty * price WHERE total IS NULL"
$$;

A DO block is compiled as a temporary named function, called once and then cleared, so its compiled code can be freed. CREATE PROCEDURE ... LANGUAGE pg_pureu works with CALL. Transaction control inside procedures is a later phase (ROADMAP.md).

Add-on Pure modules

Pure modules are scripts in the Pure library path, often with a C shared object next to them. A body loads one with a using line at the top (untrusted), or the DBA allow-lists it through pg_pure.using (trusted). Before a module goes on the tested list it is checked for process exits and aborts, signal handlers, threads, writes to standard output, and global error handlers. The vetted modules, each exercised by an in-database regression test, are:

ModuleWhat it provides
mathLoaded by default; exact rationals (%).
gsl, gsl::linalgGSL numeric routines, including a compiled Cholesky solve of a symmetric positive-definite system. GSL's abort-on-error handler is turned off.
mpfrArbitrary-precision floats (mpfr_set_default_prec then compute).
dictThe stldict STL-backed associative maps.
rationalUtilities on math's exact rationals, such as a double to a fraction.

For a dense linear solve, prefer the compiled routine over a hand-written one: a pure-Pure Cholesky is correct but slow, so use gsl::linalg::cholesky_solve, which solves a symmetric positive-definite A x = b over float8[] at C speed (about 4x faster warm than the same solve in PL/pgSQL; see Performance). In the trusted language the DBA allow-lists the module once (pg_pure.using = 'math gsl::linalg'):

CREATE FUNCTION solve_spd(a float8[], b float8[]) RETURNS float8[]
  LANGUAGE pg_pure AS $$ gsl::linalg::cholesky_solve a b $$;

A trusted body may not pull in an arbitrary module with its own using clause; that is the DBA's decision. csv, xml and stllib build against the fork but are not yet on the tested list (csv and xml are file and document oriented, awkward in a single-expression body), and glpk needs a fork-side fix to its error hook. Licenses: gsl and glpk are GPL, mpfr and others LGPL or MIT; a module you load is loaded by you at runtime, not shipped with pg_pure. This is not legal advice.

The safe-mode security model

The trusted pg_pure runs each function in a libpure safe-mode interpreter that is armed after its SPI bridge and the pg_pure.using modules are in place. After arming, a function body is refused if it uses any route out of the language:

  • an extern declaration, inline C (%< ... %>, which runs clang), or eval / evalcmd;

  • a using of a native module (lib:, bc:, dsp:) or of any module not on the pg_pure.using allowlist;

  • a dangerous prelude function (exit, malloc, free, raw pointer access), which never binds to C in safe mode, so a call to it stays an unevaluated normal form that result conversion rejects, rather than running.

Each refusal is an SQL ERROR and the backend survives; every route has a regression case in sql/pg_pure.sql, verified on PostgreSQL 17, 18 and 19. A separate guard, independent of libpure, keeps a body from defining a top-level Pure rule: the body is compiled as a single parenthesized expression and is rejected at definition time if it closes a bracket it did not open or leaves one open. That closes the state-leak channel between trusted functions in one backend; libpure's safe mode blocks the routes out of the language, not top-level definitions, so this guard is what keeps one function's interpreter state private from the next.

Caution

The safe mode is a denylist: the dangerous externs are refused at declaration. The stronger end state is a curated safe-mode prelude that never declares them, plus an independent security review, before relying on pg_pure for untrusted multi-tenant use. Both are deferred (ROADMAP.md). Until then the denylist plus arming is what stands between a pg_pure function and the host.

Other safety properties hold in both languages. An uncaught Pure throw becomes ERROR: uncaught exception: <value> (SQLSTATE 38000) and the session keeps working. Runaway recursion becomes the exception stack_fault (bounded by max_stack_depth), then an SQL error, not a crash. A statement_timeout or pg_terminate_backend cancels a running Pure computation, including an infinite loop, through libpure's interrupt hook. No PostgreSQL ERROR longjmps through Pure frames, and no Pure exception escapes into PostgreSQL; the boundary rules that guarantee this are in DESIGN.md section 4.

Performance

Measured on an EC2 c7i.4xlarge, Debian 13, PostgreSQL 17, 18 and 19, libpure on LLVM 21, 2026-11-24. The harness and full results are under bench/. The cost is bimodal: a large one-time compile per function per backend, then fast warm calls.

The first call to a given pg_pure function in a backend compiles it with LLVM, about 9 seconds on this box. PL/pgSQL, PL/Python and PL/Perl each start a function in under 15 ms. Preloading (shared_preload_libraries = 'pg_pure') warms the postmaster, but a forked backend does not inherit the warmed codegen, so every new connection pays this once per distinct function. A connection pooler that keeps backends alive is the practical answer.

Warm steady state, in microseconds per call:

workloadpg_purePL/pgSQLPL/PythonPL/Perl
fib (iterative Fibonacci)9.74.11.82.8
hsum (sum of i*i as numeric)97.817.64.53.2
chol (3x3 SPD solve, float8[])1.66.0--

pg_pure is 2x to 5x slower warm on scalar recursion and much slower on exact-number work (its integers are GMP rationals converted to numeric). Where the body calls a compiled routine, as chol does through gsl::linalg::cholesky_solve, it beats a hand-written PL/pgSQL solve by about 4x because GSL's compiled C does the work and Pure is only the glue. The draw of pg_pure is expressiveness and reaching compiled numerical libraries, not raw per-call throughput.

Limitations

  • The trusted language's protection is a denylist armed in a libpure safe-mode interpreter; a curated safe-mode prelude and an independent security review are deferred, so do not rely on pg_pure for untrusted multi-tenant workloads yet (the section called “The safe-mode security model”).

  • Preloading front-loads the one-time LLVM codegen into postmaster startup but does not lower a forked backend's first-call latency; use a connection pooler (the section called “Performance”).

  • A set-returning function materializes all its rows before LIMIT applies; an unbounded body must bound itself (the section called “Set-returning functions”).

  • sql::stream is scoped to the call that opened it; a holdable cursor that streams to a later statement is deferred.

  • Not yet supported: RETURNS TABLE and SETOF of a composite type, composite types as arguments, event triggers, per-SQL-user trusted interpreters, and transaction control in procedures.

  • Windows is not supported (three independent blockers, in DESIGN.md section 10). Linux (Debian 13) on PostgreSQL 17, 18 and 19, and FreeBSD, are supported.

ROADMAP.md is the single plan file; it records what is done and what is deferred, and it is the reference for everything the list above defers.

Authors

Gregory Burd.