emotionbug commented on issue #76:
URL: https://github.com/apache/incubator-age/issues/76#issuecomment-856354546


   I test some cases for using prepared statement.
   
   **case-1**
   ```pgsql
   -- case#1 with agtype_build_map func
   select * from cypher('age', $$ MATCH (n) WHERE n.released = $released RETURN 
n $$, agtype_build_map('released', '1999')) as (n agtype);
   -- ERROR: third argument of cypher function must be a parameter
   ```
   
https://github.com/apache/incubator-age/blob/83426d3a92bd5fee06376a38542d35efb1e6397b/src/backend/parser/cypher_analyze.c#L348-L354
   
   it looks like bug.
   
   
   
   **case-2**
   ```pgsql
   -- case#2 with none dollar quoted string
   select * from cypher('age', concat('MATCH (n) RETURN ', 'n')::cstring) as (n 
agtype);
   -- ERROR: a dollar-quoted string constant is expected
   ```
   
https://github.com/apache/incubator-age/blob/83426d3a92bd5fee06376a38542d35efb1e6397b/src/backend/parser/cypher_analyze.c#L319-L340
   
   This seems to exist to accurately mark the syntax problem, and I think it 
would be better to give the user an option.


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