Amr-Shams commented on issue #972:
URL: https://github.com/apache/age/issues/972#issuecomment-1583112592

   ```
   CloseSession=# (SELECT city FROM cypher('test2', $$MATCH (c:Person {city: 
'Lagos'}) RETURN c.city$$) as (city VARCHAR(50)));
     city
   ---------
    "Lagos"
    "Lagos"
   (2 rows)
   
   CloseSession=# SELECT city from Persons p WHERE p.city = 'Lagos';
    city
   -------
    Lagos
    Lagos
   (2 rows)
   
   ```
   the obvious difference is the double quote in the response of the cypher 
type 
   so easily you can use a trimfunction to remove the double quotes from the 
city return by the cypher here is an updated query that ran 
   ```
   SELECT * FROM Persons p WHERE p.city IN (SELECT TRIM(both '"' from city) 
FROM cypher('test2', $$MATCH (c:Person {city: 'Lagos'}) RETURN c.city$$) as 
(city VARCHAR));
   ```
   ```
    id |  name  | city  | hired_year
   ----+--------+-------+------------
     1 | Daniel | Lagos |       2023
     7 | Daniel | Lagos |       2023
     ```


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