Re: [COMMITTERS] pgsql: Fix breakage from earlier plperl fix. - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: [COMMITTERS] pgsql: Fix breakage from earlier plperl fix.
Date
Msg-id 4F0747E5.2090502@dunslane.net
Whole thread Raw
In response to Re: [COMMITTERS] pgsql: Fix breakage from earlier plperl fix.  (Alex Hunsaker <badalex@gmail.com>)
List pgsql-hackers

On 01/06/2012 02:02 PM, Alex Hunsaker wrote:
>> 3. The above is in any case almost certainly insufficient, because in my
>> tests a typeglob didn't trigger SvREADONLY(), but did cause a crash.
> Hrm the glob I was testing was *STDIN. It failed to fail in my test
> program because I was not testing *STDIN directly but instead had
> @test = (*STDIN); Ugh. Playing with it a bit more it seems only
> *STDIN, *STDERR and *STDOUT have problems. For example this seems to
> work fine for me:
> do LANGUAGE plperlu $$ open(my $fh, '>', '/tmp/t.tmp'); elog(NOTICE, $fh) $$;
>
>

$fh isn't a typeglob here, AIUI. But it's definitely not just *STDIN and 
friends. Try:

do LANGUAGE plperlu $$ $foo=1; elog(NOTICE, *foo) $$;


cheers

andrew


pgsql-hackers by date:

Previous
From: Alex Hunsaker
Date:
Subject: Re: [COMMITTERS] pgsql: Fix breakage from earlier plperl fix.
Next
From: David Fetter
Date:
Subject: Re: WIP(!) Double Writes