Re: arrays as pl/perl input arguments [PATCH]

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-27 10:38:53
Message-ID: A01D9A2D-F00E-48F8-A3AD-284276B823AB@commandprompt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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'.

/A

--
Alexey Klyukin
The PostgreSQL Company - Command Prompt, Inc.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dimitri Fontaine 2011-01-27 11:01:46 Re: Extensions support for pg_dump, patch v27
Previous Message Heikki Linnakangas 2011-01-27 10:38:52 Re: Query Optimizer + Parallel Operators