Re: Cleaning up array_in()
jian he <jian.universality@gmail.com>
From: jian he <jian.universality@gmail.com>
To: Heikki Linnakangas <hlinnaka@iki.fi>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Nikhil Benesch <nikhil.benesch@gmail.com>, Alexander Lakhin <exclusion@gmail.com>,
Nathan Bossart <nathandbossart@gmail.com>, pgsql-hackers@lists.postgresql.org
Date: 2023-09-04T00:00:00Z
Lists: pgsql-hackers
Attachments
- v4-0006-refactor-to-make-corner-case-1-int-fail.patch (text/x-patch) patch v4-0006
- v4-0007-refactor-ReadDimensionInt.patch (text/x-patch) patch v4-0007
- v4-0004-Extract-loop-to-read-array-dimensions-to-subrouti.patch (text/x-patch) patch v4-0004
- v4-0005-Determine-array-dimensions-and-parse-the-elements.patch (text/x-patch) patch v4-0005
- v4-0003-Re-indent-ArrayCount.patch (text/x-patch) patch v4-0003
- v4-0002-Rewrite-ArrayCount-to-make-dimensionality-checks-.patch (text/x-patch) patch v4-0002
- v4-0001-Simplify-and-speed-up-ReadArrayStr.patch (text/x-patch) patch v4-0001
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.
Commits
-
Don't specify number of dimensions in cases where we don't know it.
- 8d5573b92e66 17.0 landed
-
Improve readability and error detection of array_in().
- 83472de606db 17.0 landed
-
Add trailing commas to enum definitions
- 611806cd726f 17.0 cited