Re: Plperl Safe version check fails for Safe 2.09 - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: Plperl Safe version check fails for Safe 2.09
Date
Msg-id 41A3E998.80207@dunslane.net
Whole thread Raw
In response to Plperl Safe version check fails for Safe 2.09  (Mark Kirkwood <markir@coretech.co.nz>)
Responses Re: Plperl Safe version check fails for Safe 2.09  (Mark Kirkwood <markir@coretech.co.nz>)
List pgsql-hackers
Could be a rounding issue. What happens if you try this instead:?
  eval_pv((safe_version <= 2.08 ? safe_bad : safe_ok), FALSE);

Alternatively, what happens if we make safe_version a double rather than 
a float?

(If nothing else works we might have to fall back on a lexical comparison)

cheers

andrew

Mark Kirkwood wrote:

> It seems that the check in src/pl/plperl/plperl.c
>
>  eval_pv((safe_version < 2.09 ? safe_bad : safe_ok), FALSE);
>
> is not working quite as expected (CVS HEAD from today):
>
> I have Safe.pm at version 2.09, yet any plperl function I run fails 
> with :
>
> ERROR:  error from function: trusted perl functions disabled - please 
> upgrade perl Safe module to at least 2.09 at (eval 4) line 1.
>
> Just to be sure I amended the test code to :
>
>  elog(INFO, "Safe version = %f", safe_version);
>  eval_pv((safe_version < 2.09 ? safe_bad : safe_ok), FALSE);
>
> and I see :
>
> INFO:  Safe version = 2.090000
>
> (Followed by the error)
>
> I confess some puzzlement - as the code *looks* like it should work!
> The platform is Linux 2.4.22 glibc 2.3.2, perl 5.8.0 (Patched Redhat 9)
>
> regards
>
> Mark
>
>
>
>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
>      subscribe-nomail command to majordomo@postgresql.org so that your
>      message can get through to the mailing list cleanly
>


pgsql-hackers by date:

Previous
From: "Marc G. Fournier"
Date:
Subject: Re: Beta5 now Available
Next
From: Michael Fuhr
Date:
Subject: Re: OpenBSD/Sparc status