Re: jsonpath: Missing regex_like && starts with Errors?

From: Chapman Flack <jcflack(at)acm(dot)org>
To: Peter Eisentraut <peter(at)eisentraut(dot)org>, "David E(dot) Wheeler" <david(at)justatheory(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: jsonpath: Missing regex_like && starts with Errors?
Date: 2024-06-18 13:40:19
Message-ID: 66718E43.409@acm.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 06/18/24 08:30, Peter Eisentraut wrote:
> Are you saying we shouldn't allow .boolean() to be called on a JSON number?
>
> I would concur that that's what the spec says.

Or, if we want to extend the spec and allow .boolean() on a JSON number,
should it just check that the number is nonzero or zero, rather than
checking that it can be serialized then deserialized as an int4 and
otherwise complaining that it isn't a number?

Which error code to use seems to be a separate issue. Is it possible that
more codes like 2202V non-boolean SQL/JSON item were added in a later spec
than we developed the code from?

I have not read through all of the code to see in how many other places
the error code doesn't match the spec.

Regards,
-Chap

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Dave Page 2024-06-18 13:53:53 Meson far from ready on Windows
Previous Message Justin Pryzby 2024-06-18 13:36:57 Re: CI and test improvements