Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rT1qE-00HVhA-N6 for pgsql-hackers@arkaria.postgresql.org; Thu, 25 Jan 2024 15:40:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rT1qD-000gyM-HX for pgsql-hackers@arkaria.postgresql.org; Thu, 25 Jan 2024 15:40:33 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rT1qC-000gwJ-Vv for pgsql-hackers@lists.postgresql.org; Thu, 25 Jan 2024 15:40:33 +0000 Received: from mail-qt1-x82b.google.com ([2607:f8b0:4864:20::82b]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rT1q9-003K40-QS for pgsql-hackers@lists.postgresql.org; Thu, 25 Jan 2024 15:40:31 +0000 Received: by mail-qt1-x82b.google.com with SMTP id d75a77b69052e-42a6d091a67so4373711cf.0 for ; Thu, 25 Jan 2024 07:40:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dunslane-net.20230601.gappssmtp.com; s=20230601; t=1706197228; x=1706802028; darn=lists.postgresql.org; h=in-reply-to:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=LPj6FMan6erCZhcI3coHwrcFn+PeXiPYbqYUgWydODg=; b=na8N8FdVN18AN73S9xQOAOX2s6uE/jZn74lg5Uwb3yrBisA2GVvSVjbgLpz0y9E/XC PhINvFtXIvTYTKn9LL7COwKGYkGkSdYAsY33WaWI1pqSSdqd99aV6nfBOY7syut28PQ8 BBkMTUuU/+f+TA4RCUUOzkRGV0agEp9nf0roRFuHpQGwoLSAgX8WWarA5vZHe+8peG7v aW3Se/F9TKPCVBqtVnimCtx9r6p3eMZbrJZfP23inX3U1hvM75tWihZ8K15c0Mgric9Q BlZbtSssslfGAyDa2D9fnE44qtXY2hcysvzUAlTTV5oM91JbE44T2BOdfTC79hcZeL8F TBxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706197228; x=1706802028; h=in-reply-to:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=LPj6FMan6erCZhcI3coHwrcFn+PeXiPYbqYUgWydODg=; b=GnnjSBwVFIkRm4sEZgwt5XIuby0c7sgq5L1jlP2XnRCeUEDSiYPu1I15110qXQoTh9 VfmNKWWp7ldut4Cpj27lteTSJCzHtH97RUEbB39Z4LZ/5Tnh363d49Qo4Nu5rO/aW3HM 1hpGwFrUCFkMgo/yNybBulEYFz6IUphAgMxFFsp+jNeUnbJQxzeuK0vG2Tf+ttd5sr2H 4iMEXGgMDs29vw0udd6sVuRzbRoMMAX3UM0uJgQvKW/IEmwJm1j2ReS+Cw1+2hWWPrzz X91EjM7gIoEtwOceF6nJ1svCRu0x6K7znHzlxHNlFl5FSiI5koQnXrQSSYz2Nz4Ih/sc 5/6A== X-Gm-Message-State: AOJu0Yzx2vpyRNL59DroFTk96Gacl2dW45XAv1Ae/2a6hRlQpKQSCnuA WQUXtuJrCEBG/bTrtgnARCv7ke79wqEdyEU9tvzOfZTkpuQjQ0ew4l1CnwQzAOY= X-Google-Smtp-Source: AGHT+IH0+bn9GWoO/g8g7JZiSi5hd9NjHQhmO3eTTU0UpSxwpL++fq0uR05x4saTrVyAjs/9TWClJA== X-Received: by 2002:a05:622a:3:b0:42a:152d:32b4 with SMTP id x3-20020a05622a000300b0042a152d32b4mr1948851qtw.57.1706197228313; Thu, 25 Jan 2024 07:40:28 -0800 (PST) Received: from ?IPV6:2605:a601:91f3:1900::2bb? ([2605:a601:91f3:1900::2bb]) by smtp.googlemail.com with ESMTPSA id kf17-20020a05622a2a9100b0042a1223cb9bsm5493851qtb.70.2024.01.25.07.40.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 25 Jan 2024 07:40:27 -0800 (PST) Content-Type: multipart/alternative; boundary="------------x8UUuI0YVaGftnHyv09wpL0B" Message-ID: <5d37428e-0753-e721-8e77-81cc4d0dc9f1@dunslane.net> Date: Thu, 25 Jan 2024 10:40:26 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: More new SQL/JSON item methods Content-Language: en-US To: Jeevan Chalke , Peter Eisentraut Cc: PostgreSQL Hackers References: <1d092c02-8249-4e56-8b8e-ae4db95b8fde@eisentraut.org> From: Andrew Dunstan In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------x8UUuI0YVaGftnHyv09wpL0B Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 2024-01-18 Th 09:25, Jeevan Chalke wrote: > > > On Thu, Jan 18, 2024 at 1:03 AM Peter Eisentraut > 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. Thanks, I have pushed this. cheers andrew -- Andrew Dunstan EDB:https://www.enterprisedb.com --------------x8UUuI0YVaGftnHyv09wpL0B Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit


On 2024-01-18 Th 09:25, Jeevan Chalke wrote:


On Thu, Jan 18, 2024 at 1:03 AM Peter Eisentraut <peter@eisentraut.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.


Thanks, I have pushed this.


cheers


andrew


--
Andrew Dunstan
EDB: https://www.enterprisedb.com
--------------x8UUuI0YVaGftnHyv09wpL0B--