-
Notifications
You must be signed in to change notification settings - Fork 467
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Note
This looks closely related to issue #2289, but it doesn’t seem to be the same underlying problem, so I opened a new report.
Configuration
AGE Version: apache/age:latest (pulled 2025-12-26)
Operating System: WSL2 – Ubuntu 24.04.1 LTS
Installation Method: Docker
Steps to reproduce
- Start AGE via Docker
docker run \
--name age \
-p 5455:5432 \
-e POSTGRES_USER=postgresUser \
-e POSTGRES_PASSWORD=postgresPW \
-e POSTGRES_DB=postgresDB \
-d \
apache/age:latest
- Connect with psql
PGPASSWORD='postgresPW' psql -h localhost -p 5455 -U postgresUser -d postgresDB
- Run the following query
Set up:
CREATE EXTENSION IF NOT EXISTS age;
LOAD 'age';
SET search_path = ag_catalog, "$user", public;
SELECT create_graph('test');
SELECT * FROM cypher('test', $$ CREATE (:N) RETURN 1 $$) AS (x agtype);
First Control Query (WHERE true):
postgresDB=# SELECT count(*)
FROM cypher('test', $$
MATCH (n:N)
WHERE true
RETURN n
$$) AS (n agtype);
count
-------
1
(1 row)
Second Control Query (WHERE false):
postgresDB=# SELECT count(*)
FROM cypher('test', $$
MATCH (n:N)
WHERE false
RETURN n
$$) AS (n agtype);
count
-------
0
(1 row)
Third Control Query (WHERE 1 IN [] throws an error):
postgresDB=# SELECT *
FROM cypher('test', $$
WITH 1 AS x
WHERE 1 IN []
RETURN x AS v
$$) AS (v agtype);
ERROR: cache lookup failed for type 0
LINE 2: FROM cypher('test', $$
^
The buggy query:
postgresDB=# SELECT count(*)
FROM cypher('test', $$
MATCH (n:N)
WHERE 1 IN []
RETURN n
$$) AS (n agtype);
count
-------
1
(1 row)
Expected behaviour
The buggy query should behave the same as the second control query.
However, since 1 IN [] is currently problematic (reported in issue #2289), the buggy query should instead behave the same as the third control query under this condition.
Actual behaviour
The buggy query behaves the same as the first control query.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working