Re: BUG #17694: In JSONPath expressions, characters between leading $ and dot appear to be ignored
От | David G. Johnston |
---|---|
Тема | Re: BUG #17694: In JSONPath expressions, characters between leading $ and dot appear to be ignored |
Дата | |
Msg-id | CAKFQuwYTM51B6=wF6BObRBfrgCvfwKmU5qGp9jgYxwHWHiFMuQ@mail.gmail.com обсуждение исходный текст |
Ответ на | BUG #17694: In JSONPath expressions, characters between leading $ and dot appear to be ignored (PG Bug reporting form <noreply@postgresql.org>) |
Ответы |
Re: BUG #17694: In JSONPath expressions, characters between leading $ and dot appear to be ignored
|
Список | pgsql-bugs |
On Thu, Nov 24, 2022 at 3:28 AM PG Bug reporting form <noreply@postgresql.org> wrote:
The following bug has been logged on the website:
Bug reference: 17694
Logged by: David Wheeler
Email address: david@justatheory.com
PostgreSQL version: 15.1
Operating system: macOS
Description:
The correct way to specify an absolute JSON path expression is to start with
`$.`, as in:
```
david=# select '{"foo": 1}' @? '$.foo';
?column?
----------
t
```
If, however, you omit the dot (`.`), the expression incorrectly always
evaluates to true!
```
david=# select '{"foo": 1}' @? '$foo';
?column?
----------
t
It looks like the text between the `$` and `.` is ignored. I don't think
this is right. Shouldn't it be a syntax error? Seems to properly complain if
using the same pattern in subpaths:
There is a bug in this area though the syntax itself is valid since you've simply defined a variable.
While this was in moderation I posted a more detailed report and my research on the issue.
David J.
В списке pgsql-bugs по дате отправления: