"jsonb ? text" operator and JSON strings

Started by PG Bug reporting formover 3 years ago2 messagesdocs
Jump to latest
#1PG Bug reporting form
noreply@postgresql.org

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/14/functions-json.html
Description:

The description of the "jsonb ? text" operator in table 9.45 specifies its
behavior when the jsonb value is an object or an array, but not when it is a
string, number, or the null JSON object. One of the examples in 8.14.3 says,
in a comment, "A string is considered to exist if it matches a primitive
JSON string". I think the behavior of the operator on each JSON primitive
type should be spelled out in prose somewhere.

#2David G. Johnston
david.g.johnston@gmail.com
In reply to: PG Bug reporting form (#1)
Re: "jsonb ? text" operator and JSON strings

On Mon, Nov 28, 2022 at 1:34 PM PG Doc comments form <noreply@postgresql.org>
wrote:

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/14/functions-json.html
Description:

The description of the "jsonb ? text" operator in table 9.45 specifies its
behavior when the jsonb value is an object or an array, but not when it is
a
string, number, or the null JSON object. One of the examples in 8.14.3
says,
in a comment, "A string is considered to exist if it matches a primitive
JSON string". I think the behavior of the operator on each JSON primitive
type should be spelled out in prose somewhere.

I suppose we shouldn't imply it doesn't work on non-containers since it
obviously does. And by fixing that omission state clearly that on a
non-container existence and containment are equivalent and based upon
equality.

David J.