pg_liquid
pg_liquid : Liquid-inspired Datalog graph query extension for PostgreSQL
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 2705 | pg_liquid
|
pg_liquid
|
0.1.7 |
FEAT
|
MIT
|
C
|
| Attribute | Has Binary | Has Library | Need Load | Has DDL | Relocatable | Trusted |
|---|---|---|---|---|---|---|
--s-d--
|
No
|
Yes
|
No
|
Yes
|
no
|
no
|
| Relationships | |
|---|---|
| Schemas | liquid |
| See Also | age
jsquery
pg_jsonschema
pg_search
|
Packages
| Type | Repo | Version | PG Major Compatibility | Package Pattern | Dependencies |
|---|---|---|---|---|---|
| EXT | PIGSTY
|
0.1.7 |
18
17
16
15
14
|
pg_liquid |
- |
| RPM | PIGSTY
|
0.1.7 |
18
17
16
15
14
|
pg_liquid_$v |
- |
| DEB | PIGSTY
|
0.1.7 |
18
17
16
15
14
|
postgresql-$v-pg-liquid |
- |
| Linux / PG | PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|---|
el8.x86_64
|
PIGSTY 0.1.7
|
PIGSTY 0.1.7
|
PIGSTY 0.1.7
|
PIGSTY 0.1.7
|
PIGSTY 0.1.7
|
el8.aarch64
|
PIGSTY 0.1.7
|
PIGSTY 0.1.7
|
PIGSTY 0.1.7
|
PIGSTY 0.1.7
|
PIGSTY 0.1.7
|
el9.x86_64
|
PIGSTY 0.1.7
|
PIGSTY 0.1.7
|
PIGSTY 0.1.7
|
PIGSTY 0.1.7
|
PIGSTY 0.1.7
|
el9.aarch64
|
PIGSTY 0.1.7
|
PIGSTY 0.1.7
|
PIGSTY 0.1.7
|
PIGSTY 0.1.7
|
PIGSTY 0.1.7
|
el10.x86_64
|
PIGSTY 0.1.7
|
PIGSTY 0.1.7
|
PIGSTY 0.1.7
|
PIGSTY 0.1.7
|
PIGSTY 0.1.7
|
el10.aarch64
|
PIGSTY 0.1.7
|
PIGSTY 0.1.7
|
PIGSTY 0.1.7
|
PIGSTY 0.1.7
|
PIGSTY 0.1.7
|
d12.x86_64
|
PIGSTY 0.1.7
|
PIGSTY 0.1.7
|
PIGSTY 0.1.7
|
PIGSTY 0.1.7
|
PIGSTY 0.1.7
|
d12.aarch64
|
PIGSTY 0.1.7
|
PIGSTY 0.1.7
|
PIGSTY 0.1.7
|
PIGSTY 0.1.7
|
PIGSTY 0.1.7
|
d13.x86_64
|
PIGSTY 0.1.7
|
PIGSTY 0.1.7
|
PIGSTY 0.1.7
|
PIGSTY 0.1.7
|
PIGSTY 0.1.7
|
d13.aarch64
|
PIGSTY 0.1.7
|
PIGSTY 0.1.7
|
PIGSTY 0.1.7
|
PIGSTY 0.1.7
|
PIGSTY 0.1.7
|
u22.x86_64
|
PIGSTY 0.1.7
|
PIGSTY 0.1.7
|
PIGSTY 0.1.7
|
PIGSTY 0.1.7
|
PIGSTY 0.1.7
|
u22.aarch64
|
PIGSTY 0.1.7
|
PIGSTY 0.1.7
|
PIGSTY 0.1.7
|
PIGSTY 0.1.7
|
PIGSTY 0.1.7
|
u24.x86_64
|
PIGSTY 0.1.7
|
PIGSTY 0.1.7
|
PIGSTY 0.1.7
|
PIGSTY 0.1.7
|
PIGSTY 0.1.7
|
u24.aarch64
|
PIGSTY 0.1.7
|
PIGSTY 0.1.7
|
PIGSTY 0.1.7
|
PIGSTY 0.1.7
|
PIGSTY 0.1.7
|
Source
pig build pkg pg_liquid; # build rpm/debInstall
Make sure PGDG and PIGSTY repo available:
pig repo add pgsql -u # add both repo and update cacheInstall this extension with pig:
pig install pg_liquid; # install via package name, for the active PG version
pig install pg_liquid -v 18; # install for PG 18
pig install pg_liquid -v 17; # install for PG 17
pig install pg_liquid -v 16; # install for PG 16
pig install pg_liquid -v 15; # install for PG 15
pig install pg_liquid -v 14; # install for PG 14Create this extension with:
CREATE EXTENSION pg_liquid;Usage
Syntax:
CREATE EXTENSION pg_liquid; SELECT liquid.query('Edge("a","b"). Edge("b","c"). Path(X,Y) :- Edge(X,Y). Path(X,Y) :- Edge(X,Z), Path(Z,Y). Path("a",Y)?');
pg_liquid maps the Liquid blog language and data model onto native PostgreSQL storage and execution. The extension exposes SQL entry points for running Liquid-style programs, querying as a principal, and managing row normalizers that project relational rows into Liquid compounds.
Core Functions
The upstream README lists these main functions:
liquid.query(program text)liquid.query_as(principal text, program text)liquid.read_as(principal text, program text)
These support plain execution, principal-aware querying, and CLS-aware reads.
Language Features
The current README says supported program features include:
%comments- assertions and rule definitions terminated with
. - one terminal
?query Edge(...)- named compounds such as
Type@(cid=..., role=...) - query-local recursive rules
Example Shape
Programs are passed as text and can define facts, rules, and a final query:
SELECT liquid.query($$
Edge("a","b").
Edge("b","c").
Path(X,Y) :- Edge(X,Y).
Path(X,Y) :- Edge(X,Z), Path(Z,Y).
Path("a",Y)?
$$);Notes
The project README points to the VitePress documentation site as the main documentation surface and notes that operational rollout details are also documented there. The extension is currently published as PGXN package version 0.1.1 and validated against PostgreSQL 14 through 18.