Skip to content

MATCH property constraints fail when a variable is referenced more than once. #724

@dehowef

Description

@dehowef

Describe the bug
Property Constraints throw an error when they are applied to a variable mentioned more than once.

How are you accessing AGE (Command line, driver, etc.)?
Commandline through postgresql.

What data setup do we need to do?
None

What is the necessary configuration info needed?

  • Install Postgresql
  • Install AGE

What is the command that caused the error?

SELECT * from cypher('my_graph_name', $$
  MATCH (a {prop: “val”})-[]- (a {prop2: “val2”})
$$) as (a agtype);
postgres=# SELECT * FROM cypher('pilots', $$ MATCH(a{prop:"val"})-[]-(a{prop2:"val2"}) RETURN a $$ ) AS (a agtype);
2023-03-03 09:05:16.444 PST [145400] ERROR:  variable a already exists at character 59
2023-03-03 09:05:16.444 PST [145400] STATEMENT:  SELECT * FROM cypher('pilots', $$ MATCH(a{prop:"val"})-[]-(a{prop2:"val2"}) RETURN a $$ ) AS (a agtype);
ERROR:  variable a already exists
LINE 1: ... FROM cypher('pilots', $$ MATCH(a{prop:"val"})-[]-(a{prop2:"...

Expected behavior
The property constraint must be evaluated.

Environment (please complete the following information):

  • Version: 1.2.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions