Re: pgsql: Transforms for jsonb to PL/Python - Mailing list pgsql-committers

From Tom Lane
Subject Re: pgsql: Transforms for jsonb to PL/Python
Date
Msg-id 17960.1522620471@sss.pgh.pa.us
Whole thread Raw
In response to Re: pgsql: Transforms for jsonb to PL/Python  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: pgsql: Transforms for jsonb to PL/Python  (Devrim Gündüz <devrim@gunduz.org>)
Re: pgsql: Transforms for jsonb to PL/Python  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
List pgsql-committers
I wrote:
> gaur (python 2.5) is showing a different output pathology:

A bit of google research indicates that Python did not have reliable
handling of infinity or NaN floats until 2.6; before that, you could
get failures or platform-specific results from code like float('inf').
So this test ain't gonna work as-is on old versions.

I see a few options:

1. Just remove the tests involving inf/nan.  As far as I can see,
there's no explicit handling of these cases in jsonb_plpython,
so we're not really buying any test coverage of our own code anyway.

2. Maintain additional expected-output files.  One problem with this
is it's not clear how many we'd need.

3. Somehow tweak the test cases in a different way, so that they're
not exercised before 2.6.

4. Move our minimum supported Python version up to 2.6 (from 2.4
where it is now).

#4 seems like an overreaction at first sight, but on the other
hand, I wonder how many people really care about pre-2.6 anymore
anyway.  (2.4 was released Nov. 2004, 2.6 Oct 2008.)  AFAIR, the only
reason I'm running 2.5 on gaur/pademelon is we claim to support it.

            regards, tom lane


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Fix a boatload of typos in C comments.
Next
From: Devrim Gündüz
Date:
Subject: Re: pgsql: Transforms for jsonb to PL/Python