You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@age.apache.org by GitBox <gi...@apache.org> on 2021/06/08 00:42:30 UTC

[GitHub] [incubator-age] emotionbug commented on issue #76: Preparestatement supporting issues(?)

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:
users@infra.apache.org