So this has been happening frequently recently with some queries. For example: –
Today I was playing around with Apache AGE 1.3.0, and I executed this query
SELECT * from cypher('test', $$
CREATE ({name:'bobby'}),
(:Person {name:'bobby'}),
(:Bobby {name:'bobby'})
$$) as (a agtype);
Which threw unhandled cypher(cstring) function call
Error. However, executing the same query again with no changes whatsoever works perfectly fine.
test=# SELECT * from cypher('test', $$
CREATE ({name:'bobby'}),
(:Person {name:'bobby'}),
(:Bobby {name:'bobby'})
$$) as (a agtype);
2023-04-23 16:51:45.674 CEST [9032] ERROR: unhandled cypher(cstring) function call
2023-04-23 16:51:45.674 CEST [9032] DETAIL: test
2023-04-23 16:51:45.674 CEST [9032] STATEMENT: SELECT * from cypher('test', $$
CREATE ({name:'bobby'}),
(:Person {name:'bobby'}),
(:Bobby {name:'bobby'})
$$) as (a agtype);
ERROR: unhandled cypher(cstring) function call
DETAIL: test
test=# SELECT * from cypher('test', $$
CREATE ({name:'bobby'}),
(:Person {name:'bobby'}),
(:Bobby {name:'bobby'})
$$) as (a agtype);
a
---
(0 rows)
I am not completely sure if this is related to AGE 1.3.0
or is it related to the debugger that I setup recently. However, when the query was executed, the process was not attached to gdb.
What and where may this error be sprouting from?
3
Answers
After looking at the error message and the query you provided, it seems like there was an issue with the server when you first ran the query. However, executing the same query again with no changes worked fine. It’s possible that there was some distortion or issue with the server at the time of the initial query execution.
The query seems fine, and the most plausible explanation for what happened here would be a temporary issue or inconsistency in the database.
When you run the command a second time, the issue may have been resolved, or the database state may have changed to allow the command to execute successfully. You can check your database to see if it crashed or was not working the first time.
The issue occurs when AGE is not loaded properly. If you run a query without loading first, the server loads the extension by itself. Check out this github issue for more info: https://github.com/apache/age/issues/41