Re: Testing plperl<->plperlu interaction

From: decibel <decibel(at)decibel(dot)org>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>, Herrera Alvaro <alvherre(at)commandprompt(dot)com>
Cc: Tim Bunce <Tim(dot)Bunce(at)pobox(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Testing plperl<->plperlu interaction
Date: 2010-01-06 23:54:57
Message-ID: 869050CE-F612-4B02-85F7-81D0DACE1383@decibel.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Jan 6, 2010, at 5:46 PM, Andrew Dunstan wrote:
> Tim Bunce wrote:
>> I was investigating a bug in an 8.4.1 production system and distilled a
>> test case down to this:
>>
>> CREATE OR REPLACE FUNCTION bar() RETURNS integer AS $$
>> #die 'BANG!'; # causes server process to exit(2)
>> # alternative - causes server process to exit(255)
>> spi_exec_query("invalid sql statement");
>> $$ language plperl; -- plperl or plperlu
>> CREATE OR REPLACE FUNCTION foo() RETURNS integer AS $$
>> spi_exec_query("SELECT * FROM bar()");
>> return 1;
>> $$ LANGUAGE plperlu; -- must be opposite to language of bar
>> SELECT * FROM bar(); -- throws exception normally
>> SELECT * FROM foo(); -- causes the server to exit abnormaly
>>
>> before then rereading the 8.4.2 release notes and seeing that the bug
>> was already fixed. D'oh!
>>
>> I see the test suite doesn't have any plperlu tests at all.
>> Is there any reason for that?
>>
>>
>>
>
> Just that we haven't bothered. But we can't run tests for both in the same session because that doesn't work on all platforms. I actually played a bit with it the other day. Setting up some plperlu tests would be very simple.

We've actually run into similar issues. Alvaro came up with a patch that fixes our specific issue, but I think he said there were some other cases that needed to be fixed as well. Anyone looking to fix this should ping Alvaro first.
--
Jim C. Nasby, Database Architect jim(at)nasby(dot)net
512.569.9461 (cell) http://jim.nasby.net

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2010-01-07 00:00:04 Re: Testing plperl<->plperlu interaction
Previous Message Andrew Dunstan 2010-01-06 23:46:53 Re: Testing plperl<->plperlu interaction