pg_jit_available()

A function determining whether JIT is available

pg_jit_available() is a system function determining whether just-in-time compilation is available.

pg_jit_available() was added in PostgreSQL 11.

Usage

pg_jit_available() → BOOLEAN

pg_jit_available() returns TRUE if the server can provide a JIT-capable environment and the configuration parameter jit is set to on.

Change history

Examples

Basic execution example for pg_jit_available():

postgres=# SELECT pg_jit_available();
 pg_jit_available
------------------
 t
(1 row)

Executing pg_jit_available() on a serverwhere JIT is not available:

postgres=# SHOW jit;
 jit
-----
 on
(1 row)

postgres=# SELECT pg_jit_available();
 pg_jit_available
------------------
 f
(1 row)

pg_jit_available() will always return FALSE if jit is set to off:

postgres=# SET jit TO off;
SET

postgres=# SELECT pg_jit_available();
 pg_jit_available
------------------
 f
(1 row)

Categories

System function

See also

JIT, jit