From: | Mark Kirkwood <markir(at)coretech(dot)co(dot)nz> |
---|---|
To: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Plperl Safe version check fails for Safe 2.09 |
Date: | 2004-11-24 04:07:11 |
Message-ID: | 41A408EF.5060306@coretech.co.nz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
A bit more thinking led me to try:
float safe_version;
...
eval_pv((safe_version < (float)2.09 ? safe_bad : safe_ok), FALSE);
which seems to fix the issue. (after all float *should* be accurate
enough in this case)
cheers
Mark
P.s : trivial patch attached
Andrew Dunstan wrote:
>
> 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
>
Attachment | Content-Type | Size |
---|---|---|
plperl.c.diff | text/plain | 323 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2004-11-24 04:56:26 | Re: Plperl Safe version check fails for Safe 2.09 |
Previous Message | David Fetter | 2004-11-24 03:03:00 | Re: Beta5 now Available |