From:
Alexey Klyukin <alexk(at)commandprompt(dot)com>
To:
Alex Hunsaker <badalex(at)gmail(dot)com>
Cc:
"David E(dot) Wheeler" <david(at)kineticode(dot)com>,
pgsql-hackers(at)postgresql(dot)org,
Andrew Dunstan <andrew(at)dunslane(dot)net>
Subject:
Re: arrays as pl/perl input arguments [PATCH]
Date:
2011-01-31 08:34:23
Message-ID:
4116205B-5E5D-447F-8A78-EE07E8ECE545@commandprompt.com (view raw or flat )
Thread:
2011-01-11 22:25:35 from Alexey Klyukin <alexk(at)commandprompt(dot)com>
2011-01-11 23:07:53 from "David E(dot) Wheeler" <david(at)kineticode(dot)com>
2011-01-11 23:44:53 from Andrew Dunstan <andrew(at)dunslane(dot)net>
2011-01-12 00:17:05 from "David E(dot) Wheeler" <david(at)kineticode(dot)com>
2011-01-12 00:55:49 from Andrew Dunstan <andrew(at)dunslane(dot)net>
2011-01-12 02:06:09 from Robert Haas <robertmhaas(at)gmail(dot)com>
2011-01-12 04:45:51 from Andrew Dunstan <andrew(at)dunslane(dot)net>
2011-01-12 13:34:06 from Alexey Klyukin <alexk(at)commandprompt(dot)com>
2011-01-12 19:22:55 from Alex Hunsaker <badalex(at)gmail(dot)com>
2011-01-12 19:27:05 from "David E(dot) Wheeler" <david(at)kineticode(dot)com>
2011-01-12 19:27:46 from David Fetter <david(at)fetter(dot)org>
2011-01-12 19:36:17 from Alvaro Herrera <alvherre(at)commandprompt(dot)com>
2011-01-12 19:39:56 from "David E(dot) Wheeler" <david(at)kineticode(dot)com>
2011-01-12 19:51:43 from Alvaro Herrera <alvherre(at)commandprompt(dot)com>
2011-01-12 19:55:17 from "David E(dot) Wheeler" <david(at)kineticode(dot)com>
2011-01-12 20:17:08 from Alvaro Herrera <alvherre(at)commandprompt(dot)com>
2011-01-12 20:13:25 from Alexey Klyukin <alexk(at)commandprompt(dot)com>
2011-01-12 21:22:03 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2011-01-12 21:45:05 from Andrew Dunstan <andrew(at)dunslane(dot)net>
2011-01-12 23:29:28 from Robert Haas <robertmhaas(at)gmail(dot)com>
2011-01-12 23:37:34 from "David E(dot) Wheeler" <david(at)kineticode(dot)com>
2011-01-13 07:28:54 from Alex Hunsaker <badalex(at)gmail(dot)com>
2011-01-13 04:57:20 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2011-01-12 13:14:17 from Alexey Klyukin <alexk(at)commandprompt(dot)com>
2011-01-12 18:52:42 from "David E(dot) Wheeler" <david(at)kineticode(dot)com>
2011-01-12 20:04:56 from Alexey Klyukin <alexk(at)commandprompt(dot)com>
2011-01-15 22:48:28 from Alex Hunsaker <badalex(at)gmail(dot)com>
2011-01-26 18:45:52 from Alex Hunsaker <badalex(at)gmail(dot)com>
2011-01-26 19:44:26 from Alexey Klyukin <alexk(at)commandprompt(dot)com>
2011-01-26 20:08:03 from Alex Hunsaker <badalex(at)gmail(dot)com>
2011-01-26 20:35:06 from Alexey Klyukin <alexk(at)commandprompt(dot)com>
2011-01-26 22:44:05 from Alex Hunsaker <badalex(at)gmail(dot)com>
2011-01-27 07:31:47 from Alex Hunsaker <badalex(at)gmail(dot)com>
2011-01-27 10:38:53 from Alexey Klyukin <alexk(at)commandprompt(dot)com>
2011-01-28 22:27:06 from Alex Hunsaker <badalex(at)gmail(dot)com>
2011-01-31 08:34:23 from Alexey Klyukin <alexk(at)commandprompt(dot)com>
2011-02-01 17:04:47 from Alex Hunsaker <badalex(at)gmail(dot)com>
2011-02-04 01:29:59 from Alex Hunsaker <badalex(at)gmail(dot)com>
2011-02-04 17:29:59 from Andrew Dunstan <andrew(at)dunslane(dot)net>
2011-02-04 18:43:34 from Alex Hunsaker <badalex(at)gmail(dot)com>
2011-02-06 07:43:51 from Alex Hunsaker <badalex(at)gmail(dot)com>
2011-02-08 15:18:22 from Alexey Klyukin <alexk(at)commandprompt(dot)com>
2011-02-08 17:33:37 from Alex Hunsaker <badalex(at)gmail(dot)com>
2011-02-08 18:31:25 from Alex Hunsaker <badalex(at)gmail(dot)com>
2011-02-09 01:44:00 from Alex Hunsaker <badalex(at)gmail(dot)com>
2011-02-09 15:24:23 from Alexey Klyukin <alexk(at)commandprompt(dot)com>
2011-02-09 19:28:21 from Alex Hunsaker <badalex(at)gmail(dot)com>
2011-02-10 13:15:59 from Alexey Klyukin <alexk(at)commandprompt(dot)com>
2011-02-10 19:44:09 from Andrew Dunstan <andrew(at)dunslane(dot)net>
2011-02-10 21:26:58 from Alexey Klyukin <alexk(at)commandprompt(dot)com>
2011-02-12 00:17:12 from Alexey Klyukin <alexk(at)commandprompt(dot)com>
2011-02-12 07:53:14 from Alex Hunsaker <badalex(at)gmail(dot)com>
2011-02-15 14:39:07 from Alexey Klyukin <alexk(at)commandprompt(dot)com>
2011-02-15 17:45:22 from "David E(dot) Wheeler" <david(at)kineticode(dot)com>
2011-02-15 17:49:17 from Alexey Klyukin <alexk(at)commandprompt(dot)com>
2011-02-15 17:52:26 from "David E(dot) Wheeler" <david(at)kineticode(dot)com>
2011-02-16 22:54:07 from Alvaro Herrera <alvherre(at)commandprompt(dot)com>
2011-02-16 22:57:13 from Andrew Dunstan <andrew(at)dunslane(dot)net>
2011-02-18 02:12:29 from Alvaro Herrera <alvherre(at)commandprompt(dot)com>
2011-02-17 23:18:27 from Alvaro Herrera <alvherre(at)commandprompt(dot)com>
2011-02-18 00:36:45 from Alex Hunsaker <badalex(at)gmail(dot)com>
2011-02-16 17:08:11 from Tim Bunce <Tim(dot)Bunce(at)pobox(dot)com>
2011-02-16 19:21:58 from Alvaro Herrera <alvherre(at)commandprompt(dot)com>
2011-02-17 06:12:46 from Alex Hunsaker <badalex(at)gmail(dot)com>
2011-01-13 05:12:47 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2011-01-13 07:06:33 from Alex Hunsaker <badalex(at)gmail(dot)com>
2011-01-13 08:06:45 from Martijn van Oosterhout <kleptog(at)svana(dot)org>
2011-01-13 16:55:44 from Alex Hunsaker <badalex(at)gmail(dot)com>
2011-01-14 00:15:29 from "Stephen J(dot) Butler" <stephen(dot)butler(at)gmail(dot)com>
2011-01-14 00:22:31 from "David E(dot) Wheeler" <david(at)kineticode(dot)com>
2011-02-02 17:16:00 from Tim Bunce <Tim(dot)Bunce(at)pobox(dot)com>
2011-02-03 12:23:32 from Alexey Klyukin <alexk(at)commandprompt(dot)com>
2011-02-03 16:52:50 from "David E(dot) Wheeler" <david(at)kineticode(dot)com>
2011-02-03 18:01:16 from Tim Bunce <Tim(dot)Bunce(at)pobox(dot)com>
2011-02-03 18:20:48 from Andrew Dunstan <andrew(at)dunslane(dot)net>
2011-02-08 14:40:38 from Andrew Dunstan <andrew(at)dunslane(dot)net>
2011-02-09 19:16:35 from Tim Bunce <Tim(dot)Bunce(at)pobox(dot)com>
2011-02-03 18:24:47 from Peter Eisentraut <peter_e(at)gmx(dot)net>
2011-02-03 20:21:42 from Alex Hunsaker <badalex(at)gmail(dot)com>
Lists:
pgsql-hackers
On Jan 29, 2011, at 12:27 AM, Alex Hunsaker wrote:
> On Thu, Jan 27, 2011 at 03:38, Alexey Klyukin <alexk(at)commandprompt(dot)com> wrote:
>> Hi,
>>
>> On Jan 27, 2011, at 9:31 AM, Alex Hunsaker wrote:
>>
>>> Find attached v3 of the patch. changes include:
>>> - fix deep recursion due to accidental reversal of check in encode_array_literal
>>> - add proper support for stringifying composite/row types. I did not
>>> find a good way to quote these from the perl on the fly, so instead we
>>> compute it the same way we used to and store the string inside the new
>>> object along with the array :(.
>>> - misc whitespace and code touchups
>>> <pg_to_perl_arrays_v3.patch.gz>
>>
>>
>> Nice improvement. It passes all the regression tests on my OS X system. I have only a minor suggestion, I think is_array is worth mentioning in the utility functions chapter of the pl/perl documentation, it would be also more clear to use it in regression tests as opposed to manually checking whether the ref is equal to 'PostgreSQL::InServer::ARRAY'.
>
> Wait a second... Just who is reviewing who's patch? :P
>
Oh, sorry, got confused along the way :)
> Both done in the attached. I also renamed is_array() to
> is_array_ref() for clarity (hopefully).
> <pg_to_perl_arrays_v4.patch.gz>
Thank you.
I've looked at the patch and added a test for arrays exceeding or equal maximum dimensions to check, whether the recursive function won't bring surprises there. I've also added check_stack_depth calls to both split_array and plperl_hash_from_tuple. Note that the regression fails currently due to the incorrect error reporting in
PostgreSQL, per http://archives.postgresql.org/pgsql-hackers/2011-01/msg02888.php .
The v5 is attached.
In response to
Responses
pgsql-hackers by date
Next :From: Jürgen WolfsgruberDate: 2011-01-31 09:16:22
Subject : Problem with postgresql database connection in combination with HUAWEI data modem
Previous :From : Jörg Roman RudnickDate : 2011-01-31 08:32:54
Subject : [pgsql-general 2011-1-21:] Are there any projects interested in
object functionality? (+ rule bases)