TODO request: multi-dimensional arrays in PL/pythonU

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема TODO request: multi-dimensional arrays in PL/pythonU
Дата
Msg-id 520AA585.40003@agliodbs.com
обсуждение исходный текст
Ответы Re: TODO request: multi-dimensional arrays in PL/pythonU
Список pgsql-hackers
All,

Currently PL/python has 1 dimension hardcoded for returning arrays:

create or replace function nparr ()
returns float[][]
language plpythonu
as $f$
from numpy import array
x = ((1.0,2.0),(3.0,4.0),(5.0,6.0),)
return x
$f$;

josh=# select nparr()
;
ERROR:  invalid input syntax for type double precision: "(1.0, 2.0)"
CONTEXT:  while creating return value
PL/Python function "nparr"
josh=#

I'd like to add the following TODO to the TODO list:

PL/Python

[] Allow functions to return multi-dimensional arrays from lists or
numpy arrays.


-- 
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com



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

Предыдущее
От: Greg Stark
Дата:
Сообщение: Re: Review: UNNEST (and other functions) WITH ORDINALITY
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [GENERAL] Possible bug with row_to_json