Re: More new SQL/JSON item methods
От | Jeevan Chalke |
---|---|
Тема | Re: More new SQL/JSON item methods |
Дата | |
Msg-id | CAM2+6=UCSp74devvHYpMx5NvpyWbCO3gYvgpEYHtNYqF2j6Z9Q@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: More new SQL/JSON item methods (Andrew Dunstan <andrew@dunslane.net>) |
Ответы |
Re: More new SQL/JSON item methods
|
Список | pgsql-hackers |
Hello,
On Tue, Oct 24, 2023 at 6:41 PM Andrew Dunstan <andrew@dunslane.net> wrote:
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.
In some switch cases, they are still divided, like in flattenJsonPathParseItem(), where 2-arg, 1-arg, and no-arg cases are clubbed together. But I have tried to keep them in order in those subgroups.
I will rebase my patches for this task on this patch, but before doing so, I would like to get your views on this reordering.
Thanks
Вложения
В списке pgsql-hackers по дате отправления: