Assertion failure with 6-dimensional array in PL/python

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Assertion failure with 6-dimensional array in PL/python
Дата
Msg-id 61647b8e-961c-0362-d5d3-c8a18f4a7ec6@iki.fi
обсуждение исходный текст
Список pgsql-bugs
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



В списке pgsql-bugs по дате отправления:

Предыдущее
От: Daniele Varrazzo
Дата:
Сообщение: PostgreSQL 9.6 fails to install on Ubuntu
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: ERROR: insufficient columns in the PRIMARY KEY constraint definition