Обсуждение: "jsonb ? text" operator and JSON strings

Поиск
Список
Период
Сортировка

"jsonb ? text" operator and JSON strings

От
PG Doc comments form
Дата:
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.

Re: "jsonb ? text" operator and JSON strings

От
"David G. Johnston"
Дата:
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.