On tis, 2009-12-01 at 20:53 -0700, Joshua Tolley wrote:
> This patch doesn't include any documentation; my reading of the PL/Python docs
> suggests that's probably acceptable, as the existing docs don't talk about its
> array handling. That said, it might be useful to include an example, to show
>
On Fri, Nov 20, 2009 at 12:00:24AM +0200, Peter Eisentraut wrote:
> On fre, 2009-11-13 at 18:46 +0300, Teodor Sigaev wrote:
> > CREATE OR REPLACE FUNCTION incr(stuff int[]) RETURNS int[] AS $$
> > for x in stuff:
> > yield x+1
> > $$
> > LANGUAGE 'plpythonu';
> >
> > # select incr(ARRAY[1,2,3
On Fri, Nov 20, 2009 at 12:00:24AM +0200, Peter Eisentraut wrote:
> On fre, 2009-11-13 at 18:46 +0300, Teodor Sigaev wrote:
> > CREATE OR REPLACE FUNCTION incr(stuff int[]) RETURNS int[] AS $$
> > for x in stuff:
> > yield x+1
> > $$
> > LANGUAGE 'plpythonu';
> >
> > # select incr(ARRAY[1,2,3
On fre, 2009-11-13 at 18:46 +0300, Teodor Sigaev wrote:
> CREATE OR REPLACE FUNCTION incr(stuff int[]) RETURNS int[] AS $$
> for x in stuff:
> yield x+1
> $$
> LANGUAGE 'plpythonu';
>
> # select incr(ARRAY[1,2,3]);
> ERROR: invalid memory alloc request size 18446744073709551608
> CONTEXT: w
CREATE OR REPLACE FUNCTION incr(stuff int[]) RETURNS int[] AS $$
for x in stuff:
yield x+1
$$
LANGUAGE 'plpythonu';
# select incr(ARRAY[1,2,3]);
ERROR: invalid memory alloc request size 18446744073709551608
CONTEXT: while creating return value
PL/Python function "incr"
Suppose, it could
On ons, 2009-11-04 at 16:02 +0200, Peter Eisentraut wrote:
> Here is a patch to support arrays in PL/Python as parameters and
> return values.
Slightly updated version with fixed reference counting.
diff --git a/src/pl/plpython/expected/plpython_types.out b/src/pl/plpython/expected/plpython_types.
On ons, 2009-11-04 at 09:44 -0500, Robert Haas wrote:
> On Wed, Nov 4, 2009 at 9:02 AM, Peter Eisentraut wrote:
> > Here is a patch to support arrays in PL/Python as parameters and return
> > values. It converts an array parameter to a Python "list", and converts
> > a Python "sequence" return va
On Wed, Nov 4, 2009 at 9:02 AM, Peter Eisentraut wrote:
> Here is a patch to support arrays in PL/Python as parameters and return
> values. It converts an array parameter to a Python "list", and converts
> a Python "sequence" return value back to an array.
This is probably a stupid question, but
Here is a patch to support arrays in PL/Python as parameters and return
values. It converts an array parameter to a Python "list", and converts
a Python "sequence" return value back to an array.
I have settled on two implementation restrictions for the moment:
- Only supports one-dimensional arr