You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
List predicate (ALL/any/none/single) over node values in a WHERE clause raises internal error no relation entry for relid (XX000) #2516
Putting a list predicate — ALL, any, none, or single — over a list of node or relationship values inside a WHERE clause makes AGE 1.8.0 fail with the PostgreSQL internal error ERROR: XX000: no relation entry for relid 2. The failure is at query-planning time, needs no data, and reproduces on an empty graph.
MATCH p = (a)-->(b) WHERE ALL(x IN nodes(p) WHERE true) RETURN 1
The predicate function name is irrelevant (ALL/any/none/single all reproduce) and the filter body is already reduced to WHERE true — the trigger is the list predicate over a node/relationship-valued list in WHERE.
Access method
Command line via psql, inside the official Docker container apache/age:1.8.0
Data setup
No data is required — the error reproduces on an empty graph. Only the graph itself must exist:
CREATE EXTENSION IF NOT EXISTS age;
LOAD 'age';
SET search_path = ag_catalog, "$user", public;
SELECT create_graph('graph_test');
Configuration
None beyond the stock AGE extension. No additional modules (no PostGIS, etc.), default search_path handling as shown above.
Command that triggers the error
SELECT*FROM cypher('graph_test', $$ MATCH p = (a)-->(b) WHERE ALL(x IN nodes(p) WHERE true) RETURN 1 $$) AS (c0 agtype);
ERROR: no relation entry for relid 2
(SQLSTATE XX000, internal error.) The failure is data-independent: it occurs both on an empty graph and when the graph already contains nodes and edges. Replacing ALL with any, none, or single produces the identical error.
The bug is specific to WHERE — the same predicate runs cleanly (0 rows, no error) when the list is projected through WITH, placed in RETURN, or the list holds plain integers:
-- works: list projected through WITH, then filteredSELECT*FROM cypher('graph_test', $$ MATCH p = (a)-->(b) WITH nodes(p) AS L WHERE ALL(x IN L WHERE true) RETURN 1 $$) AS (c0 agtype);-- works: predicate in RETURN clauseSELECT*FROM cypher('graph_test', $$ MATCH p = (a)-->(b) RETURN ALL(x IN nodes(p) WHERE true) $$) AS (c0 agtype);-- works: list of plain integers in WHERESELECT*FROM cypher('graph_test', $$ MATCH (a)-[r]->(b) WHERE ALL(x IN [1] WHERE true) RETURN 1 $$) AS (c0 agtype);
Expected behavior
MATCH p = (a)-->(b) WHERE ALL(x IN nodes(p) WHERE true) is valid standard Cypher (it executes in Neo4j). AGE should either run it and return rows, or raise a normal user-facing Cypher error — it must not leak a PostgreSQL internal error (XX000) caused by referencing a relation that was never registered.
Confirmed still reproducing on current master (4d9b2506, AGE 1.8.0) built against PostgreSQL 18.4, in a fresh database:
ERROR: no relation entry for relid 2
Reproduces with the list predicate over node values in WHERE exactly as described.
Triaged as part of a sweep over the current fuzz-report backlog against master. This one is a clean error rather than a crash — recording it so it is not assumed stale just because it was filed against an older image.
Activity
gregfelice commentedon Aug 21, 2026
Confirmed still reproducing on current master (
4d9b2506, AGE 1.8.0) built against PostgreSQL 18.4, in a fresh database:Reproduces with the list predicate over node values in
WHEREexactly as described.Triaged as part of a sweep over the current fuzz-report backlog against master. This one is a clean error rather than a crash — recording it so it is not assumed stale just because it was filed against an older image.