rafsun42 opened a new issue, #1028:
URL: https://github.com/apache/age/issues/1028
**Describe the bug**
If any `reserved_keyword` specified in `cypher_gram.y` is used as a label
name in a MATCH clause, the label name is converted to lowercase. As a result,
the MATCH clause return empty result set because the lowercase'd label name
does not match with the original label in `ag_label` table.
**How are you accessing AGE (Command line, driver, etc.)?**
- Command line (PG 12.10)
**What data setup do we need to do?**
None
**What is the necessary configuration info needed?**
N/A
**What is the command that caused the error?**
```pgsql
select * from cypher('imdb', $$ EXPLAIN MATCH (x:IN)-[]->() RETURN 1 $$) as
(a agtype);
```
In `cypher_gram.y` file, `n->label` is `in`, instead of `IN`.
```c
...
path_node:
'(' var_name_opt label_opt properties_opt ')'
{
cypher_node *n;
n = make_ag_node(cypher_node);
n->name = $2;
n->label = $3;
n->parsed_label = $3;
n->props = $4;
n->location = @2;
$$ = (Node *)n;
}
;
...
```
This issue occurs for any `reserved_keyword`.
This issue also occurs in the definition of `path_relationship` in
`cypher_gram.y`.
**Expected behavior**
`n->label` should be `IN`.
**Environment (please complete the following information):**
AGE is compiled from the branch where PG12 is merged with master.
Postgresql version is 12.10.
**Additional context**
N/A
--
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]