Search Postgresql Archives

plpython returns integer[] fails for multi-dimensional array

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In postgresql-9.0.1 I have to modify my plpython functions that return arrays.
It seems one dimesional arrays are handled properly, but not
2-dimensional arrays.

create or replace function atest() returns integer[] as $eopy$
 a = list()
 a.append(1)
 a.append(2)
 a.append(3)
 #return a works fine
 b = list()
 b.append(a)
 b.append(a)
 # error
 return b
$eopy$ language plpythonu


select atest() gives
obtest=# select atest();
ERROR:  invalid input syntax for integer: "[1, 2, 3]"
CONTEXT:  while creating return value
PL/Python function "atest"

How can I return multi-dimensional arrays in plpython?

TJ O'Donnell

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux