Re: arrays as pl/perl input arguments [PATCH] - Mailing list pgsql-hackers

From David E. Wheeler
Subject Re: arrays as pl/perl input arguments [PATCH]
Date
Msg-id E1D41132-12DA-4012-95A0-FE8A983789A7@kineticode.com
Whole thread Raw
In response to Re: arrays as pl/perl input arguments [PATCH]  ("Stephen J. Butler" <stephen.butler@gmail.com>)
List pgsql-hackers
On Jan 13, 2011, at 4:15 PM, Stephen J. Butler wrote:

> Suppose one of these compatibility objects is passed into legacy code
> as $_[0]. The problem is that 'ref $_[0]' will return 'Pg::ArrayArg'
> instead of what it used to, '' (empty string). Other than that, I
> think it performs as people would expect.

Well, frankly, since up to this patch you *never* got an ARRAY reference argument, who would be calling `ref` on it
anyway?

> You could even change 'as_s' to generate the string on the fly as
> requested instead of generating both representations at instantiation.

Yep.

Best,

David



pgsql-hackers by date:

Previous
From: "Kevin Grittner"
Date:
Subject: Re: SSI patch version 8
Next
From: Tom Lane
Date:
Subject: Re: auto-sizing wal_buffers