From: Dmitry Dolgov <9erthalion6@gmail.com>
To: Pavel Stehule <pavel.stehule@gmail.com>
Cc: Justin Pryzby <pryzby@telsasoft.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: David Steele <david@pgmasters.net>
Cc: Nikita Glukhov <n.gluhov@postgrespro.ru>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: David Fetter <david@fetter.org>
Cc: Thomas Munro <thomas.munro@gmail.com>
Cc: Thomas Munro <thomas.munro@enterprisedb.com>
Cc: Oleksandr Shulgin <oleksandr.shulgin@zalando.de>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Andres Freund <andres@anarazel.de>
Cc: Michael Paquier <michael.paquier@gmail.com>
Cc: Oleg Bartunov <obartunov@gmail.com>
Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Subject: Re: [HACKERS] [PATCH] Generic type subscripting
Date: Mon, 28 Sep 2020 11:36:31 +0200
Message-ID: <20200928093631.obnmgllx3ihhjvsd@localhost> (raw)
In-Reply-To: <CAFj8pRCAeJABdnU68orQ_SetFPiV7kvFgLAyU2ZF8d2n3RFXSA@mail.gmail.com>
References: <20200916093703.rkyl66ggdhmw5pc6@localhost>
<CAFj8pRDWShrKjNs7Q1u=ZDT4jKpXQfVwfy-kA6K_JXtRF8MoYg@mail.gmail.com>
<20200917105849.vgqhutrooatdxwzq@localhost>
<CAFj8pRDuJ8n3tf_kaxd4evp3uKa8h3KA97q4GG5qRDxicbGazg@mail.gmail.com>
<20200917135627.7koag6rnhshgjlai@localhost>
<CAFj8pRAQS3Z_ViOmMKCHWTu2uzajCuUUWwxq3z2nWpRWE1D3tg@mail.gmail.com>
<20200918110204.77yu4ioqlhhfhcya@localhost>
<CAFj8pRCUSjBAzdfe3meEk9OMY-ZaQRmTgsaJwGRDQ+jh=0x5gA@mail.gmail.com>
<20200920154652.etzmrphoe3hiod7t@localhost>
<CAFj8pRCAeJABdnU68orQ_SetFPiV7kvFgLAyU2ZF8d2n3RFXSA@mail.gmail.com>
> On Fri, Sep 25, 2020 at 06:43:38PM +0200, Pavel Stehule wrote:
>
> I checked this set of patches and it looks well.
>
> I have only one minor comment. I understand the error message, but I am not
> sure if without deeper knowledge I can understand.
>
> +update test_jsonb_subscript set test_json[-8] = 1;
> +ERROR: path element at position 1 is out of range: -8
>
> Maybe 'value of subscript "-8" is out of range'. Current error message is
> fully correct - but people probably have to think "what is a path element
> at position 1?" It doesn't look intuitive.
>
> Do you have some idea?
Interesting question. I've borrowed this error message format from other
parts of setPath function where it appears couple of times and
unfortunately can't suggest anything better. In case it this patch will
get lucky enough to attract someone else, maybe we can leave it to a
committer, what do you think?
> My comment is minor, and I mark this patch with pleasure as ready for
> committer.
>
> patching and compiling - without problems
> implemented functionality - I like it
> Building doc - without problems
> make check-world - passed
Thanks!
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: 9erthalion6@gmail.com, pavel.stehule@gmail.com, pryzby@telsasoft.com, tgl@sss.pgh.pa.us, david@pgmasters.net, n.gluhov@postgrespro.ru, alvherre@2ndquadrant.com, david@fetter.org, thomas.munro@gmail.com, thomas.munro@enterprisedb.com, oleksandr.shulgin@zalando.de, robertmhaas@gmail.com, andres@anarazel.de, michael.paquier@gmail.com, obartunov@gmail.com, peter.eisentraut@2ndquadrant.com
Subject: Re: [HACKERS] [PATCH] Generic type subscripting
In-Reply-To: <20200928093631.obnmgllx3ihhjvsd@localhost>
References: <20200916093703.rkyl66ggdhmw5pc6@localhost> <CAFj8pRDWShrKjNs7Q1u=ZDT4jKpXQfVwfy-kA6K_JXtRF8MoYg@mail.gmail.com> <20200917105849.vgqhutrooatdxwzq@localhost> <CAFj8pRDuJ8n3tf_kaxd4evp3uKa8h3KA97q4GG5qRDxicbGazg@mail.gmail.com> <20200917135627.7koag6rnhshgjlai@localhost> <CAFj8pRAQS3Z_ViOmMKCHWTu2uzajCuUUWwxq3z2nWpRWE1D3tg@mail.gmail.com> <20200918110204.77yu4ioqlhhfhcya@localhost> <CAFj8pRCUSjBAzdfe3meEk9OMY-ZaQRmTgsaJwGRDQ+jh=0x5gA@mail.gmail.com> <20200920154652.etzmrphoe3hiod7t@localhost> <CAFj8pRCAeJABdnU68orQ_SetFPiV7kvFgLAyU2ZF8d2n3RFXSA@mail.gmail.com> <20200928093631.obnmgllx3ihhjvsd@localhost>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox