Re: [HACKERS] Endless loop calling PL/Python set returning functions

2016-03-10 Thread Alexey Grishchenko
> the > > key we intend to delete is in the globals dictionary. > > That whole business with putting a function's parameters into a global > dictionary makes me itch. Doesn't it mean problems if one plpython > function calls another (presumably via SPI)? > > regards, tom lane > -- Best regards, Alexey Grishchenko

Re: [HACKERS] Endless loop calling PL/Python set returning functions

2016-03-10 Thread Alexey Grishchenko
nd global dictionary ("GD"). I will think on this, maybe there might be a better design for this scenario. But I still think the second scenario requires a separate patch On Thu, Mar 10, 2016 at 4:33 PM, Tom Lane <t...@sss.pgh.pa.us> wrote: > Alexey Grishchenko <agrishche...@pivotal.

[HACKERS] Endless loop calling PL/Python set returning functions

2016-03-10 Thread Alexey Grishchenko
PLy_function_delete_args is modified as well to check whether the key we intend to delete is in the globals dictionary. New regression test is included in the patch. -- Best regards, Alexey Grishchenko 0001-Fix-endless-loop-in-plpython-set-returning-function.patch Description: Binary data -- Sent via pgsql

Re: [HACKERS] Endless loop calling PL/Python set returning functions

2016-03-10 Thread Alexey Grishchenko
Tom Lane <t...@sss.pgh.pa.us> wrote: > Alexey Grishchenko <agrishche...@pivotal.io <javascript:;>> writes: > > No, my fix handles this well. > > In fact, with the first function call you allocate global variables > > representing Python function input parame

Re: [HACKERS] Endless loop calling PL/Python set returning functions

2016-03-11 Thread Alexey Grishchenko
Alexey Grishchenko <agrishche...@pivotal.io> wrote: > Tom Lane <t...@sss.pgh.pa.us> wrote: > >> Alexey Grishchenko <agrishche...@pivotal.io> writes: >> > No, my fix handles this well. >> > In fact, with the first function call you allocate global v

Re: [HACKERS] Endless loop calling PL/Python set returning functions

2016-03-22 Thread Alexey Grishchenko
Alexey Grishchenko <agrishche...@pivotal.io> wrote: > Alexey Grishchenko <agrishche...@pivotal.io> wrote: > >> Tom Lane <t...@sss.pgh.pa.us> wrote: >> >>> Alexey Grishchenko <agrishche...@pivotal.io> writes: >>> > No, my fix han

[HACKERS] Fix for PL/Python slow input arrays traversal issue

2016-07-28 Thread Alexey Grishchenko
all pl_regression(# select null::int8 as a pl_regression(# ) as q; test 55 (1 row) Time: 22.839 ms -- Best regards, Alexey Grishchenko 0001-Fix-for-PL-Python-slow-input-arrays-traversal-issue.patch Description: Binary data -- Sent via pgsql-hackers

Re: [HACKERS] PL/Python adding support for multi-dimensional arrays

2016-08-03 Thread Alexey Grishchenko
On Wed, Aug 3, 2016 at 12:49 PM, Alexey Grishchenko <agrishche...@pivotal.io > wrote: > Hi > > Current implementation of PL/Python does not allow the use of > multi-dimensional arrays, for both input and output parameters. This forces > end users to introduce workaround

[HACKERS] PL/Python adding support for multi-dimensional arrays

2016-08-03 Thread Alexey Grishchenko
ay_int4(ARRAY[[1,2,3],[4,5,6]]); INFO: ([[1, 2, 3], [4, 5, 6]], ) test_type_conversion_array_int4 - {{1,2,3},{4,5,6}} (1 row) -- Best regards, Alexey Grishchenko 0001-PL-Python-adding-support-for-multi-dimensional-arrays.patch Description: Binary data -- Se