pdpotter opened a new issue #41:
URL: https://github.com/apache/incubator-age/issues/41


   After creating a new database connection, the first cypher query results in 
a `ERROR:  unhandled cypher(cstring) function call error`. This error does not 
occur on subsequent cypher queries, or if a create_graph query has been 
executed prior to the cypher query.
   
   How to reproduce:
   * Set up database
   ```
   vagrant@local:~$ sudo -u postgres createdb testdb
   vagrant@local:~$ sudo -u postgres psql -d testdb -c "CREATE EXTENSION age;"
   CREATE EXTENSION
   vagrant@local:~$ sudo -u postgres psql -d testdb -c "LOAD 'age';"
   LOAD
   ```
   * First connection to create a graph and add some data. Here, the cypher 
query succeeds.
   ```
   vagrant@local:~$ sudo -u postgres psql -d testdb
   psql (11.7 (Debian 11.7-0+deb10u1), server 11.10 (Debian 11.10-0+deb10u1))
   Type "help" for help.
   
   testdb=# SET search_path = ag_catalog, "$user", public;
   SET
   testdb=# SELECT create_graph('testgraph');
   NOTICE:  graph "testgraph" has been created
    create_graph 
   --------------
    
   (1 row)
   
   testdb=# SELECT * from cypher('testgraph', $$ CREATE (a:Person {name: 
'Tom'}) $$) as (a agtype);
    a 
   ---
   (0 rows)
   
   testdb=# \q
   ```
   * Second connection to query the graph. The first cypher query fails, the 
second query succeeds.
   ```
   vagrant@local:~$ sudo -u postgres psql -d testdb
   psql (11.7 (Debian 11.7-0+deb10u1), server 11.10 (Debian 11.10-0+deb10u1))
   Type "help" for help.
   
   testdb=# SET search_path = ag_catalog, "$user", public;
   SET
   testdb=# SELECT * FROM cypher('testgraph', $$MATCH (p) return p$$) as (a 
agtype);
   ERROR:  unhandled cypher(cstring) function call
   DETAIL:  testgraph
   testdb=# SELECT * FROM cypher('testgraph', $$MATCH (p) return p$$) as (a 
agtype);
   
                                            a                                   
      
   
-----------------------------------------------------------------------------------
    {"id": 844424930131969, "label": "Person", "properties": {"name": 
"Tom"}}::vertex
   (1 row)
   
   (END)
   
   testdb=# \q
   ```
   * Third connection to add more data. The first cypher query again fails, the 
second query again succeeds.
   ```
   vagrant@local:~$ sudo -u postgres psql -d testdb
   psql (11.7 (Debian 11.7-0+deb10u1), server 11.10 (Debian 11.10-0+deb10u1))
   Type "help" for help.
   
   testdb=# SET search_path = ag_catalog, "$user", public;
   SET
   testdb=# SELECT * from cypher('testgraph', $$ CREATE (a:Person {name: 
'Ann'}) $$) as (a agtype);
   ERROR:  unhandled cypher(cstring) function call
   DETAIL:  testgraph
   testdb=# SELECT * from cypher('testgraph', $$ CREATE (a:Person {name: 
'Ann'}) $$) as (a agtype);
    a 
   ---
   (0 rows)
   
   testdb=# \q
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to