Re: BUG #17694: In JSONPath expressions, characters between leading $ and dot appear to be ignored

From: "David E(dot) Wheeler" <david(at)justatheory(dot)com>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #17694: In JSONPath expressions, characters between leading $ and dot appear to be ignored
Date: 2022-11-24 17:26:58
Message-ID: 7B406A27-7142-4F6D-976A-207B4487C7C3@justatheory.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Nov 24, 2022, at 12:16, David G. Johnston <david(dot)g(dot)johnston(at)gmail(dot)com> wrote:

> There is a bug in this area though the syntax itself is valid since you've simply defined a variable.

Sorry, I don’t follow. What variable is defined? I mean `$` is a variable for the whole expression, and always required at the start of a JSONPath, AFAICT. But when running

select '{"foo": 1}' @? ‘$foo'

or

select '{}' @? ‘$foo'

(both of which incorrectly return true), there is no `$foo` path; it has to be `$.foo`.

Best,

David

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message David G. Johnston 2022-11-24 17:44:21 Re: BUG #17694: In JSONPath expressions, characters between leading $ and dot appear to be ignored
Previous Message David G. Johnston 2022-11-24 17:22:56 Re: BUG #17696: Creation of deferrable initially deferred constraint breaks before transaction commit