Re: Incorrect matching of sql/json PASSING variable names

2024-06-19 Thread Amit Langote
On Thu, Jun 13, 2024 at 5:04 PM Amit Langote wrote: > On Thu, Jun 6, 2024 at 6:20 PM Amit Langote wrote: > > > > Hi, > > > > Alvaro reported off-list that the following should really fail, > > because the jsonpath expression refers to a PASSING variable that > > doesn't exist: > > > > select

Re: Incorrect matching of sql/json PASSING variable names

2024-06-13 Thread Amit Langote
On Thu, Jun 6, 2024 at 6:20 PM Amit Langote wrote: > > Hi, > > Alvaro reported off-list that the following should really fail, > because the jsonpath expression refers to a PASSING variable that > doesn't exist: > > select json_query('"1"', jsonpath '$xy' passing 2 AS xyz); > json_query >

Incorrect matching of sql/json PASSING variable names

2024-06-06 Thread Amit Langote
Hi, Alvaro reported off-list that the following should really fail, because the jsonpath expression refers to a PASSING variable that doesn't exist: select json_query('"1"', jsonpath '$xy' passing 2 AS xyz); json_query 2 (1 row) This works because of a bug in GetJsonPathVar()