Re: More new SQL/JSON item methods

From: Jeevan Chalke <jeevan(dot)chalke(at)enterprisedb(dot)com>
To: Peter Eisentraut <peter(at)eisentraut(dot)org>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: More new SQL/JSON item methods
Date: 2024-01-18 14:25:28
Message-ID: CAM2+6=Wys-tgwA15WkgW+8uR0SKncFLZuj0B+ukjvxbrebz9qQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jan 18, 2024 at 1:03 AM Peter Eisentraut <peter(at)eisentraut(dot)org>
wrote:

> On 17.01.24 10:03, Jeevan Chalke wrote:
> > I added unary '+' and '-' support as well and thus thought of having
> > separate rules altogether rather than folding those in.
> >
> > Per SQL standard, the precision and scale arguments are unsigned
> > integers, so unary plus and minus signs are not supported. So my
> patch
> > removes that support, but I didn't adjust the regression tests for
> that.
> >
> >
> > However, PostgreSQL numeric casting does support a negative scale. Here
> > is an example:
> >
> > # select '12345'::numeric(4,-2);
> > numeric
> > ---------
> > 12300
> > (1 row)
> >
> > And thus thought of supporting those.
> > Do we want this JSON item method to behave differently here?
>
> Ok, it would make sense to support this in SQL/JSON as well.
>

OK. So with this, we don't need changes done in your 0001 patches.

>
> > I will merge them all into one and will try to keep them in the order
> > specified in sql_features.txt.
> > However, for documentation, it makes more sense to keep them in logical
> > order than the alphabetical one. What are your views on this?
>
> The documentation can be in a different order.
>

Thanks, Andrew and Peter for the confirmation.

Attached merged single patch along these lines.

Peter, I didn't understand why the changes you did in your 0002 patch were
required here. I did run the pgindent, and it didn't complain to me. So,
just curious to know more about the changes. I have not merged those
changes in this single patch. However, if needed it can be cleanly applied
on top of this single patch.

Thanks

--
Jeevan Chalke

*Principal, ManagerProduct Development*

edbpostgres.com

Attachment Content-Type Size
v6-0001-Implement-various-jsonpath-methods.patch application/octet-stream 156.2 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2024-01-18 14:40:56 Re: cleanup patches for incremental backup
Previous Message Aleksander Alekseev 2024-01-18 14:20:49 Re: UUID v7