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

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Susmitha S <susmithaselvarani(dot)ds(at)gmail(dot)com>
Cc: "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: Possible Bug in JSON_QUERY() Behavior in PostgreSQL 17
Date: 2025-02-23 03:18:59
Message-ID: CAKFQuwYPVx_V92BerbW6_Bqzps_TS2NWs6UrYw4mYeruQ0vE9g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Thursday, February 20, 2025, Susmitha S <susmithaselvarani(dot)ds(at)gmail(dot)com>
wrote:
>
>
> 1.
> - 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: 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.

In response to

Browse pgsql-bugs by date

  From Date Subject
Previous Message Kashaela Ransaw 2025-02-23 01:13:33 error -10825