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.