Skip to content

Commit 3ae6ed9

Browse files
committed
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 94aceed. Backpatch-through: 10 Discussion: https://www.postgresql.org/message-id/61647b8e-961c-0362-d5d3-c8a18f4a7ec6%40iki.fi
1 parent db96be2 commit 3ae6ed9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/pl/plpython/plpy_typeio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -643,7 +643,7 @@ PLyList_FromArray(PLyDatumToOb *arg, Datum d)
643643
/* Array dimensions and left bounds */
644644
ndim = ARR_NDIM(array);
645645
dims = ARR_DIMS(array);
646-
Assert(ndim < MAXDIM);
646+
Assert(ndim <= MAXDIM);
647647

648648
/*
649649
* We iterate the SQL array in the physical order it's stored in the

0 commit comments

Comments
 (0)