pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Transforms for jsonb to PL/Python
Date: Sun, 01 Apr 2018 18:07:51 -0400
Message-ID: <17960.1522620471@sss.pgh.pa.us> (raw)
In-Reply-To: <6087.1522473328@sss.pgh.pa.us>
References: <E1f1AMU-00031c-9N@gemulon.postgresql.org>
	<20d9fdcc-eaec-647a-bf27-e7cc5861547f@2ndquadrant.com>
	<6087.1522473328@sss.pgh.pa.us>

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




view thread (9+ messages)  latest in thread

Message-ID: <17960.1522620471@sss.pgh.pa.us>
Permalink:  ../17960.1522620471@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/17960.1522620471@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, peter.eisentraut@2ndquadrant.com, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Transforms for jsonb to PL/Python
  In-Reply-To: <17960.1522620471@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox