TODO request: multi-dimensional arrays in PL/pythonU

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: PG Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: TODO request: multi-dimensional arrays in PL/pythonU
Date: 2013-08-13 21:30:45
Message-ID: 520AA585.40003@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2013-08-13 21:34:12 Re: [GENERAL] Possible bug with row_to_json
Previous Message Greg Stark 2013-08-13 20:33:49 Re: Review: UNNEST (and other functions) WITH ORDINALITY