TODO request: multi-dimensional arrays in PL/pythonU - Mailing list pgsql-hackers

From Josh Berkus
Subject TODO request: multi-dimensional arrays in PL/pythonU
Date
Msg-id 520AA585.40003@agliodbs.com
Whole thread Raw
Responses Re: TODO request: multi-dimensional arrays in PL/pythonU  (Peter Eisentraut <peter_e@gmx.net>)
List 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 by date:

Previous
From: Greg Stark
Date:
Subject: Re: Review: UNNEST (and other functions) WITH ORDINALITY
Next
From: Tom Lane
Date:
Subject: Re: [GENERAL] Possible bug with row_to_json