Re: Cleaning up array_in()

From: jian he <jian(dot)universality(at)gmail(dot)com>
To: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Nikhil Benesch <nikhil(dot)benesch(at)gmail(dot)com>, Alexander Lakhin <exclusion(at)gmail(dot)com>, Nathan Bossart <nathandbossart(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Cleaning up array_in()
Date: 2023-09-04 23:53:13
Message-ID: CACJufxGHhVv4gFRrP6p=TevbukP96TFkVYgA_omNJJP7eqDuiA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Sep 4, 2023 at 8:00 AM jian he <jian(dot)universality(at)gmail(dot)com> wrote:
>
> hi.
> attached v4.
> v4, 0001 to 0005 is the same as v3 in
> https://www.postgresql.org/message-id/5859ce4e-2be4-92b0-c85c-e1e24eab57c6%40iki.fi
>
> v4-0006 doing some modifications to address the corner case mentioned
> in the previous thread (like select '{{1,},{1},}'::text[]).
> also fixed all these FIXME, Heikki mentioned in the code.
>
> v4-0007 refactor ReadDimensionInt. to make the array dimension bound
> variables within the INT_MIN and INT_MAX. so it will make select
> '[21474836488:21474836489]={1,2}'::int[]; fail.

attached, same as v4, but delete unused variable {nitems_according_to_dims}.

Attachment Content-Type Size
v5-0005-Determine-array-dimensions-and-parse-the-elements.patch text/x-patch 38.3 KB
v5-0001-Simplify-and-speed-up-ReadArrayStr.patch text/x-patch 8.1 KB
v5-0002-Rewrite-ArrayCount-to-make-dimensionality-checks-.patch text/x-patch 20.3 KB
v5-0003-Re-indent-ArrayCount.patch text/x-patch 10.7 KB
v5-0004-Extract-loop-to-read-array-dimensions-to-subrouti.patch text/x-patch 8.2 KB
v5-0006-resolve-corner-case.patch text/x-patch 6.8 KB
v5-0007-refactor-ReadDimensionInt.patch text/x-patch 2.2 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Rui Zhao 2023-09-05 02:06:55 Re: pg_upgrade fails with in-place tablespace
Previous Message Soumyadeep Chakraborty 2023-09-04 23:43:59 Re: brininsert optimization opportunity