MuhammadTahaNaveed opened a new issue, #1002:
URL: https://github.com/apache/age/issues/1002
**Describe the bug**
Age is allowing invalid reuse of variables in CREATE clause.
**How are you accessing AGE (Command line, driver, etc.)?**
- terminal
**What is the command that caused the error?**
```pgsql
SELECT * FROM cypher('cypher_match', $$ MATCH p=(p) RETURN p $$)as (p
agtype);
```
```
ERROR: column reference "p" is ambiguous
LINE 1: SELECT * FROM cypher('cypher_match', $$ MATCH p=(p) RETURN p $$)as
(p...
```
```pgsql
SELECT * FROM cypher('cypher_vle', $$ MATCH ()-[p]-()-[p *]-() RETURN p
$$)as (p agtype);
```
```
ERROR: column reference "p" is ambiguous
LINE 1: ... cypher('cypher_vle', $$ MATCH ()-[p]-()-[p *]-() RETURN p $$)as
(p...
```
**Expected behavior**
Should have error out with an apropriate message e.g `duplicate variable`.
**Environment (please complete the following information):**
- Version: latest
**Additional context**
Need to add proper checks for valid variable reuse.
--
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]