Don't specify number of dimensions in cases where we don't know it.
commit8d5573b92e66075c20f327d93d46a24095739a58
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 17 Nov 2023 16:29:42 +0000 (17 11:29 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 17 Nov 2023 16:29:46 +0000 (17 11:29 -0500)
treedc8c81e72f8fe0e766d12d7bf09c38bbca2f4b84
parent284cbaea7c4b89ce8685a148baeaf1d7896a900e
Don't specify number of dimensions in cases where we don't know it.

A few places in array_in() and plperl would report a misleading value
(always MAXDIM+1) for the number of dimensions in the input, because
we'd error out as soon as that was clearly too large rather than
scanning the entire input.  There doesn't seem to be much value in
offering the true number, at least not enough to justify the extra
complication involved in trying to get it.  So just remove that
parenthetical remark.  We already have other places that do it
like that, anyway.

Per suggestions from Alexander Lakhin and Heikki Linnakangas.

Discussion: https://postgr.es/m/2794005.1683042087@sss.pgh.pa.us
src/backend/utils/adt/arrayfuncs.c
src/pl/plperl/expected/plperl_array.out
src/pl/plperl/plperl.c