On Thu, Sep 26, 2019 at 07:05:59PM +0200, Michael Weiser wrote:
> On Tue, Sep 24, 2019 at 12:06:33AM -0700, Noah Misch wrote:
> > Another possibility is to disable the strtod() call when building against 
> > older
> > Perl; instead, use sv_setpv() to store the float as a string.  Perl would
> 
> > Does that approach have material disadvantages?
> 
> I like this approach since it aligns with what a pre 3.6.0 version of
> DBD::Pg will silently do with a current perl as well. I have been using
> it this way for a couple of years and not noticed any problems.
> 
> BTW: What *was* the trigger for adding strtod() in the first place if
> perl does the conversion on the fly?

Good question.  I'm not finding a discussion about it.  I've added the author of
commit 5355656, in case he remembers.  A possible motive is lower memory usage,
or at least more-predictable memory usage.  (Suppose you store millions of
floats as strings, converting few or none of them.)

> Should I try my luck at a patch or is it too trivial now?

Still worth a try, in my opinion.

Reply via email to