postgres.git / summary / log / commit / refs
commit 17fc1c729fc2220fee1ec125ff63d2f7ba6f466e
Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
Date: Thu Oct 01 08:48:48 2020 +0000
First released in: 14.0, 10.15, 11.10, 12.5, 13.1
Fix incorrect assertion on number of array dimensions.
This has been wrong ever since the support for multi-dimensional
arrays as PL/python function arguments and return values was
introduced in commit 94aceed317.
Backpatch-through: 10
Discussion: https://www.postgresql.org/message-id/61647b8e-961c-0362-d5d3-c8a18f4a7ec6%40iki.fi
src/pl/plpython/plpy_typeio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/pl/plpython/plpy_typeio.c b/src/pl/plpython/plpy_typeio.c
index d6a6a849c32..62c46d9aabc 100644
--- a/src/pl/plpython/plpy_typeio.c
+++ b/src/pl/plpython/plpy_typeio.c
@@ -683,7 +683,7 @@ PLyList_FromArray(PLyDatumToOb *arg, Datum d)
/* Array dimensions and left bounds */
ndim = ARR_NDIM(array);
dims = ARR_DIMS(array);
- Assert(ndim < MAXDIM);
+ Assert(ndim <= MAXDIM);
/*
* We iterate the SQL array in the physical order it's stored in the
[parent: 5b76e8fb675e]