ns-hygao opened a new issue, #1393:
URL: https://github.com/apache/age/issues/1393

   **Describe the bug**
   I simplified the Cypher query to do the following:
   1. `MATCH` nodes with `Object` label
   2. `MATCH` nodes that are connected with the nodes resulting from the 
previous query by any edge
   3. `RETURN` the nodes
   
   **How are you accessing AGE (Command line, driver, etc.)?**
   - Command line inside `psql` client
   
   **What data setup do we need to do?**
   Minimal data setup:
   postgresDB=# SELECT * FROM ag_catalog.create_graph('testgraph');
   postgresDB=# SELECT * FROM cypher('testgraph', $$ CREATE (n1:Object)  RETURN 
n1$$)
   postgresDB=# SELECT * FROM cypher('testgraph', $$ MATCH (n1:Object)
                       MATCH (n2:Object)
                       WHERE EXISTS((n1)-[]->(n2))
                       RETURN n2 $$)
   AS (n2 agtype);
   ERROR:  missing FROM-clause entry for table "n1"
   LINE 1: SELECT * FROM cypher('testgraph', $$ MATCH (n1:Object)
   
   
   **What is the necessary configuration info needed?**
   
   **What is the command that caused the error?**
   postgresDB=# SELECT * FROM cypher('testgraph', $$ MATCH (n1:Object)
                       MATCH (n2:Object)
                       WHERE EXISTS((n1)-[]->(n2))
                       RETURN n2 $$)
   AS (n2 agtype);
   ERROR:  missing FROM-clause entry for table "n1"
   LINE 1: SELECT * FROM cypher('testgraph', $$ MATCH (n1:Object)
   
   **Expected behavior**
   The query should succeed and return 0 rows.
   
   **Environment (please complete the following information):**
   - Installed from docker image obtained from command command `docker pull 
apache/age`
   - Run using docker command `docker run \
       --name myPostgresDb  \
       -p 5455:5432 \
       -e POSTGRES_USER=postgresUser \
       -e POSTGRES_PASSWORD=postgresPW \
       -e POSTGRES_DB=postgresDB \
       -d \
       apache/age`
   - PostgreSQL version 15.4
   
   **Additional context**
   


-- 
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.

To unsubscribe, e-mail: dev-unsubscr...@age.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to