Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/backend/parser/cypher_expr.c
Original file line number Diff line number Diff line change
Expand Up @@ -978,10 +978,16 @@ static Node *transform_column_ref_for_indirection(cypher_parsestate *cpstate,
pnsi = refnameNamespaceItem(pstate, NULL, relname, cr->location,
&levels_up);

/* if we didn't find anything, return NULL */
/*
* If we didn't find anything, try looking for a previous variable
* reference. Otherwise, return NULL (colNameToVar will return NULL
* if nothing is found).
*/
if (!pnsi)
{
return NULL;
Node *prev_var = colNameToVar(pstate, relname, false, cr->location);

return prev_var;
}

/* find the properties column of the NSI and return a var for it */
Expand Down