Why does SET p1 = $person in Apache AGE Cypher return “SET clause expects a map” when using a prepared statement?
10:01 04 Dec 2025

I'm using Apache AGE with PostgreSQL 17. I’m trying to create a node and set all of its properties from a parameter map using a prepared statement, as mentioned here: https://age.apache.org/age-manual/master/advanced/prepared_statements.html.

PREPARE ag_create_person(agtype) AG 
SELECT * FROM cypher(
    'graph', 
    $$ CREATE (p1:Person) SET p1 = $person $$, 
    $1) 
AS (result agtype);

However, PostgreSQL returns this error:

ERROR:  SET clause expects a map
LINE 2: ... * FROM cypher('graph', $$ create (p1:Person) set p1 = $pers...

Using SET p1.name = $name works, but it requires manually listing all property keys and values.

My question is: Does AGE support using SET p1 = $param with agtype? If not, what is the correct syntax for parameterized property maps?

postgresql apache-age