Re: More new SQL/JSON item methods - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: More new SQL/JSON item methods
Date
Msg-id 1d092c02-8249-4e56-8b8e-ae4db95b8fde@eisentraut.org
Whole thread Raw
In response to Re: More new SQL/JSON item methods  (Jeevan Chalke <jeevan.chalke@enterprisedb.com>)
Responses Re: More new SQL/JSON item methods
List pgsql-hackers
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.

> 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.




pgsql-hackers by date:

Previous
From: Daniel Gustafsson
Date:
Subject: Re: initdb's -c option behaves wrong way?
Next
From: Robert Haas
Date:
Subject: Re: psql JSON output format