Re: Plperl Safe version check fails for Safe 2.09

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Plperl Safe version check fails for Safe 2.09
Дата
Msg-id 3895.1101272186@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Plperl Safe version check fails for Safe 2.09  (Mark Kirkwood <markir@coretech.co.nz>)
Ответы Re: Plperl Safe version check fails for Safe 2.09  ("Andrew Dunstan" <andrew@dunslane.net>)
Список pgsql-hackers
Mark Kirkwood <markir@coretech.co.nz> writes:
> 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):

Yah know, I looked at that on Monday and said to myself "Self, that
looks like a rounding problem waiting to happen" ... but in the absence
of a trouble report didn't want to mess with it.

Part of the problem is that Perl NV is double, not float, and so the
declaration of safe_version is wrong on its face.  But even with it
properly declared, exact comparison of double values is playing with
fire.  I'd be inclined to change it to something like
double safe_version;...if (safe_version < 2.0899999) ...
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Arnold.Zhu"
Дата:
Сообщение: How to make @id or $id as parameter name in plpgsql, is it available?
Следующее
От: "Barry Lind"
Дата:
Сообщение: Re: [JDBC] Strange server error with current 8.0beta driver