pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Chapman Flack <jcflack@acm.org>
To: Peter Eisentraut <peter@eisentraut.org>
To: David E. Wheeler <david@justatheory.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: jsonpath: Missing regex_like && starts with Errors?
Date: Tue, 18 Jun 2024 09:40:19 -0400
Message-ID: <66718E43.409@acm.org> (raw)
In-Reply-To: <6cb5a1cd-333b-449e-87a1-73e3802a3539@eisentraut.org>
References: <9272D3A9-8805-4DE1-A95F-84EB210EC121@justatheory.com>
	<666CFC8E.1000108@acm.org>
	<DE3701E1-E45E-489B-AFE8-68E1379EEAD3@justatheory.com>
	<666DBFEC.70201@acm.org>
	<F789151A-85EF-4D72-81CB-49E5472B3A78@justatheory.com>
	<9BAFB50F-267E-4078-9558-36155E93A723@justatheory.com>
	<6670BC59.1010204@acm.org>
	<565BA19A-EC85-4DE0-A21B-A298C358096E@justatheory.com>
	<6670EE22.60808@acm.org>
	<6cb5a1cd-333b-449e-87a1-73e3802a3539@eisentraut.org>

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





view thread (12+ messages)

Message-ID: <66718E43.409@acm.org>
Permalink:  ../66718E43.409@acm.org/
Also on:    postgresql.org/message-id/66718E43.409@acm.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: jcflack@acm.org, peter@eisentraut.org, david@justatheory.com, pgsql-hackers@lists.postgresql.org
  Subject: Re: jsonpath: Missing regex_like && starts with Errors?
  In-Reply-To: <66718E43.409@acm.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox