Re: Testing plperl<->plperlu interaction - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: Testing plperl<->plperlu interaction
Date
Msg-id 4B4520ED.5000602@dunslane.net
Whole thread Raw
In response to Testing plperl<->plperlu interaction  (Tim Bunce <Tim.Bunce@pobox.com>)
Responses Re: Testing plperl<->plperlu interaction  (decibel <decibel@decibel.org>)
List pgsql-hackers

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.

cheers

andrew


pgsql-hackers by date:

Previous
From: Tim Bunce
Date:
Subject: Testing plperl<->plperlu interaction
Next
From: decibel
Date:
Subject: Re: Testing plperl<->plperlu interaction