pgsql: Don't specify number of dimensions in cases where we don't know

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Don't specify number of dimensions in cases where we don't know
Date: 2023-11-17 16:29:59
Message-ID: E1r41jD-005uIQ-8l@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/8d5573b92e66075c20f327d93d46a24095739a58

Modified Files
--------------
src/backend/utils/adt/arrayfuncs.c | 8 ++++----
src/pl/plperl/expected/plperl_array.out | 2 +-
src/pl/plperl/plperl.c | 4 ++--
3 files changed, 7 insertions(+), 7 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2023-11-17 16:59:02 pgsql: Allow tests to pass in OpenSSL FIPS mode (rest)
Previous Message Peter Eisentraut 2023-11-17 16:01:36 pgsql: Allow tests to pass in OpenSSL FIPS mode (TAP tests)