diangamichael commented on issue #1714: URL: https://github.com/apache/age/issues/1714#issuecomment-2035535583
It seems you're trying to execute Cypher queries within a PostgreSQL environment using the cypher function. The error you're encountering is due to the incorrect usage of the '|' symbol in the label definition within your MATCH clause. In Cypher, '|' is not used to denote multiple labels for a node. Instead, you should use the IN keyword. Here's the corrected version of your first query: sql Copy code SELECT * FROM cypher('playground', $$ MATCH (n) WHERE n:Movie OR n:Person RETURN n $$) AS (v agtype); This query will match nodes that have either the label 'Movie' or 'Person'. Alternatively, you can use your second query as you provided: sql Copy code SELECT * FROM cypher('playground', $$ MATCH (n) WHERE label(n) = 'Movie' OR label(n) = 'Person' RETURN n $$) AS (v agtype); Both queries should achieve the same result, with the second one explicitly checking the labels of nodes. Choose whichever you find more readable or preferable for your use case. -- 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 For queries about this service, please contact Infrastructure at: us...@infra.apache.org