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 1qvHCN-004J9T-TY for pgsql-hackers@arkaria.postgresql.org; Tue, 24 Oct 2023 13:11:56 +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 1qvHCL-007QD8-2W for pgsql-hackers@arkaria.postgresql.org; Tue, 24 Oct 2023 13:11:53 +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 1qvHCK-007QD0-P7 for pgsql-hackers@lists.postgresql.org; Tue, 24 Oct 2023 13:11:53 +0000 Received: from mail-qk1-x733.google.com ([2607:f8b0:4864:20::733]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qvHCI-0024Wn-ML for pgsql-hackers@lists.postgresql.org; Tue, 24 Oct 2023 13:11:52 +0000 Received: by mail-qk1-x733.google.com with SMTP id af79cd13be357-779f2718accso14756785a.1 for ; Tue, 24 Oct 2023 06:11:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dunslane-net.20230601.gappssmtp.com; s=20230601; t=1698153109; x=1698757909; 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=+8EoQAUyrK8IRWjrGQpAb54m9ukb6bhQC3KtH6ScqIc=; b=YE58BERlWjPDZgVGTskfJaia0MGh+7tRWKQSIXDzH3o+DsTw6XYHyoZQ21EK6bWFc7 eRiHRbavBH2wQdia1p+wRsDiYv+OcQIqBTVIOnPWwqC3zc5W30vwwuBgUaYJdyvZwbzz FgPsD4H31Xw5PAFGO5HoutvxG4482qfSW+jxXSrJfaHIe+dpDOaFDnu5m6psPCgoospa 3mOR66n6dthxwV0tzpkTbCdqAS8BQBL7c4K7CNm1tK1Ec4SHNpF8nRnnELC2AoYYJkyB SX2XrXvVOuM+XmJdU8DPfvGiCQ/ohNRflSdxBiB+4LyH0FZ1dn6aNzpFDj2p8saDK+rn cZqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698153109; x=1698757909; 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=+8EoQAUyrK8IRWjrGQpAb54m9ukb6bhQC3KtH6ScqIc=; b=CDTLAW89sEl7aZO1Bl2NEXCTkmBC2gMzMZQ8EzFDJbP47ti4Mc0xQq9140Fbgu/epc ZtBA5IKpPYZkYSzmzjHZQoI8aNGHaya23NytNG6DvZnFVOYusygOwaGWa+xKiHItvO2i pB68ZP1s7Wb1y9aEC/uEe7iQKYGKnTJJaLakob9EqfI1Rwkj9RMcyJJc9t6b1REt8r0v SllfZ2TpF9d32efJXcziribpwUbYLxYaVbaiw12mT9hxqqRm0ZMl4LJihc2522WEqmV8 gbxHmV9qpw8N1+AhzdiBQj39ibeFqAqhRkP0HkzZXSfB/bzQDzFruKK8iSYQwx9oznA6 Hu9g== X-Gm-Message-State: AOJu0Yxz++e37U8/gdF/BYWznhUAqsKK0r0TU0GEFna9nLJJh9W4sYSp m4UOJd70fECN/YT1AnU22jKccA== X-Google-Smtp-Source: AGHT+IFqzlfBeYy24CmXyPPBdooM1KsWA2opB78qFxsxSEb3xEnLo9V7aOzJMFcNpTZF2pT44wrWwg== X-Received: by 2002:a05:620a:20dd:b0:774:226b:c327 with SMTP id f29-20020a05620a20dd00b00774226bc327mr12231973qka.67.1698153109310; Tue, 24 Oct 2023 06:11:49 -0700 (PDT) Received: from ?IPV6:2605:a601:912a:2800::2bb? ([2605:a601:912a:2800::2bb]) by smtp.googlemail.com with ESMTPSA id x9-20020a05620a14a900b0076f1d8b1c2dsm3423387qkj.12.2023.10.24.06.11.48 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 24 Oct 2023 06:11:48 -0700 (PDT) Content-Type: multipart/alternative; boundary="------------eVrhltvEb8lmrNtrh09wj9u0" Message-ID: Date: Tue, 24 Oct 2023 09:11:47 -0400 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: <6d4feb29-6ced-a7b0-2c15-42d3e8e201f7@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. --------------eVrhltvEb8lmrNtrh09wj9u0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 2023-10-19 Th 02:06, Jeevan Chalke wrote: > Thanks, Peter for the comments. > > On Fri, Oct 6, 2023 at 5:13 PM Peter Eisentraut > wrote: > > On 29.08.23 09:05, Jeevan Chalke wrote: > > v1-0001-Implement-jsonpath-.bigint-.integer-and-.number-m.patch > > > > This commit implements jsonpath .bigint(), .integer(), and .number() > > methods.  The JSON string or a numeric value is converted to the > > bigint, int4, and numeric type representation. > > A comment that applies to all of these: These add various keywords, > switch cases, documentation entries in some order.  Are we happy with > that?  Should we try to reorder all of that for better > maintainability > or readability? > > > Yeah, that's the better suggestion. While implementing these methods, > I was confused about where to put them exactly and tried keeping them > in some logical place. > I think once these methods get in, we can have a follow-up patch > reorganizing all of these. I think it would be better to organize things how we want them before adding in more stuff. cheers andrew -- Andrew Dunstan EDB:https://www.enterprisedb.com --------------eVrhltvEb8lmrNtrh09wj9u0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit


On 2023-10-19 Th 02:06, Jeevan Chalke wrote:
Thanks, Peter for the comments.

On Fri, Oct 6, 2023 at 5:13 PM Peter Eisentraut <peter@eisentraut.org> wrote:
On 29.08.23 09:05, Jeevan Chalke wrote:
> v1-0001-Implement-jsonpath-.bigint-.integer-and-.number-m.patch
>
> This commit implements jsonpath .bigint(), .integer(), and .number()
> methods.  The JSON string or a numeric value is converted to the
> bigint, int4, and numeric type representation.

A comment that applies to all of these: These add various keywords,
switch cases, documentation entries in some order.  Are we happy with
that?  Should we try to reorder all of that for better maintainability
or readability?

Yeah, that's the better suggestion. While implementing these methods, I was confused about where to put them exactly and tried keeping them in some logical place.
I think once these methods get in, we can have a follow-up patch reorganizing all of these.


I think it would be better to organize things how we want them before adding in more stuff.


cheers


andrew


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