MuhammadTahaNaveed opened a new issue, #975:
URL: https://github.com/apache/age/issues/975

   **Describe the bug**
   Age is allowing invalid reuse of variables in CREATE clause.
   
   **How are you accessing AGE (Command line, driver, etc.)?**
   - terminal
   
   **What is the command that caused the error?**
   ```pgsql
   SELECT * from cypher('my_graph_name', $$
     CREATE p=(p)
   $$) as (a agtype);
   ```
   This command should error out saying that `p is already declared` but it 
passes.
   ```
    result 
   --------
   (0 rows)
   ```
   ```pgsql
   SELECT * from cypher('my_graph_name', $$
     CREATE p=(p) RETURN p
   $$) as (a agtype);
   ```
   ```
   ERROR:  column reference "p" is ambiguous
   LINE 1: ...ELECT * from cypher('new4', $$CREATE p=(p) RETURN p$$) as (r...
   ```
   
   **Expected behavior**
   Should have failed with error saying `p already declared`
   
   **Environment (please complete the following information):**
   - latest
   
   **Additional context**
   Need to add proper checks for valid variable reuse.
   


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