aru-d-at opened a new issue, #809:
URL: https://github.com/apache/age/issues/809

   **Describe the bug**
   CALL with subqueries not working correctly. Instead of returning the 
expected values, it throws a syntax error after the RETURN clause.
   
   **How are you accessing AGE (Command line, driver, etc.)?**
   - Command Line
   
   **What data setup do we need to do?**
   - None
   
   **What is the necessary configuration info needed?**
   - Base install only
   
   **What is the command that caused the error?**
   ```pgsql
   SELECT * FROM cypher('call_test', $$
   UNWIND [0, 1, 2] AS x
   CALL {
     RETURN x as innerReturn
   }
   RETURN innerReturn
   $$) AS (v agtype);
   ```
   ```
   ERROR:  syntax error at or near "x"
   LINE 4:   RETURN x as innerReturn
   ```
   ---
   
   ```
   SELECT * FROM cypher('call_test', $$
   UNWIND [0, 1, 2] AS x
   CALL count(x) WITH x RETURN x AS innerReturn
   $$) AS (v agtype);
   ```
   ```
   ERROR:  Procedure call inside a query does not support naming results 
implicitly
   LINE 1: SELECT * FROM cypher('call_test', $$
                                                                            ^
   HINT:  Name explicitly using `YIELD` instead
   ```
   ---
   
   ```
   SELECT * FROM cypher('call_test', $$
   UNWIND [0, 1, 2] AS x
   CALL {
   WITH x
   RETURN x*x as innerReturn
   }
   RETURN innerReturn
   $$) AS (v agtype);
   ```
   ```
   ERROR:  syntax error at or near "x"
   LINE 4: WITH x
   ```
   
   **Expected behavior**
   The innerReturn should be returning the correct outcome(s),
   ```
   0
   1
   2
   Rows: 3
   ```
   ---
   ```
   0
   1
   4
   Rows: 3
   ```
   
   **Environment (please complete the following information):**
   - AGE v1.1.0
   - PG12
   - Fedora 37
   


-- 
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: [email protected]

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

Reply via email to