Skip to content

Commit

Permalink
Fixed query bug
Browse files Browse the repository at this point in the history
Signed-off-by: Anikait Agrawal <[email protected]>
  • Loading branch information
Anikait Agrawal committed Nov 22, 2023
1 parent afc89da commit 0837436
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions contrib/babelfishpg_tsql/src/pl_comp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1536,9 +1536,6 @@ pltsql_post_column_ref(ParseState *pstate, ColumnRef *cref, Node *var)
* helpful error message possible.)
*/

if ((geovar = resolve_geospatial_func_ref(pstate, cref)) != NULL)
return geovar;

myvar = resolve_column_ref(pstate, expr, cref, (var == NULL));

if (myvar != NULL && var != NULL)
Expand All @@ -1554,6 +1551,11 @@ pltsql_post_column_ref(ParseState *pstate, ColumnRef *cref, Node *var)
errdetail("It could refer to either a PL/tsql variable or a table column."),
parser_errposition(pstate, cref->location)));
}
else if (var == NULL)
{
if ((geovar = resolve_geospatial_func_ref(pstate, cref)) != NULL)
return geovar;
}

return myvar;
}
Expand Down

0 comments on commit 0837436

Please sign in to comment.