Re: Possible Bug in JSON_QUERY() Behavior in PostgreSQL 17

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: Possible Bug in JSON_QUERY() Behavior in PostgreSQL 17
Дата
Msg-id CAKFQuwYPVx_V92BerbW6_Bqzps_TS2NWs6UrYw4mYeruQ0vE9g@mail.gmail.com
обсуждение исходный текст
Ответ на Possible Bug in JSON_QUERY() Behavior in PostgreSQL 17  (Susmitha S <susmithaselvarani.ds@gmail.com>)
Список pgsql-bugs
On Thursday, February 20, 2025, Susmitha S <susmithaselvarani.ds@gmail.com> wrote:
    • However, when the ERROR ON ERROR clause is omitted, instead of throwing an error or returning a meaningful response, it simply returns an empty result.

image.png



The meaning of “empty result” in PostgreSQL is a result set with zero rows.  As shown here you get a result/rows, their contents are just null (consider using \pset null ‘<null>’ or some such if you want to distinguish empty string from nulls).

As already mentioned, the production of a null value for non-matches is the documented behavior.

David J.

Вложения

В списке pgsql-bugs по дате отправления: