Thread
Commits
-
Fix incorrect assertion on number of array dimensions.
- 3ae6ed9187bc 10.15 landed
- 17fc1c729fc2 11.10 landed
- fb35798a8855 12.5 landed
- 3c85489ec9cd 13.1 landed
- e1761871c096 14.0 landed
-
Support multi-dimensional arrays in PL/python.
- 94aceed31773 10.0 cited
-
Assertion failure with 6-dimensional array in PL/python
Heikki Linnakangas <hlinnaka@iki.fi> — 2020-09-30T21:06:07Z
create extension plpythonu; -- from 'plpython_types' regression test CREATE FUNCTION test_type_conversion_array_int4(x int4[]) RETURNS int4[] AS $$ plpy.info(x, type(x)) return x $$ LANGUAGE plpythonu; postgres=# SELECT * FROM test_type_conversion_array_int4(ARRAY [[[[[[ 1 ]]]]]]); server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request. The connection to the server was lost. Attempting reset: Failed. !?> TRAP: FailedAssertion("!(ndim < 6)", File: "plpy_typeio.c", Line: 686) The assertion looks like this: if (ARR_NDIM(array) == 0) return PyList_New(0); /* Array dimensions and left bounds */ ndim = ARR_NDIM(array); dims = ARR_DIMS(array); Assert(ndim < MAXDIM); <----- I believe that's wrong, it should be "ndim <= MAXDIM". Looks like I introduced this in commit 94aceed317, in v10. I'll go fix that... - Heikki