pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: grv87@yandex.ru
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #8355: PL/Python 3 can't convert infinity to PostgreSQL's value
Date: Sat, 03 Aug 2013 12:47:14 -0400
Message-ID: <4679.1375548434@sss.pgh.pa.us> (raw)
In-Reply-To: <8645.1375477524@sss.pgh.pa.us>
References: <E1V5C2C-0005EG-L3@wrigleys.postgresql.org>
	<7861.1375475031@sss.pgh.pa.us>
	<8645.1375477524@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

I wrote:
> ... But it seems like maybe we had better cover the
> following cases that we do not cover today:

> 	inf
> 	+inf
> 	-inf
> 	+Infinity

I've committed a patch that makes sure float4in and float8in accept
these spellings even when the underlying strtod(3) function does not.
However, it turns out that this doesn't fix your test case on my HPUX
box, and I'm betting that it won't help on Windows either, because
it's actually Python that's failing.  You can reproduce the failure
without any Postgres code involved at all:

$ python
Python 2.5.1 (r251:54863, Jul 12 2007, 23:25:33) 
[GCC 2.95.3 20010315 (release)] on hp-ux10
Type "help", "copyright", "credits" or "license" for more information.
>>> a = float('inf')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: invalid literal for float(): inf

Now, I seriously doubt that the Python guys will give a darn about
a 15-year-old version of HPUX, but if you can reproduce the above
on your Windows machine, I'd suggest filing a bug about it with them.

			regards, tom lane


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (5+ messages)  latest in thread

Message-ID: <4679.1375548434@sss.pgh.pa.us>
Permalink:  ../4679.1375548434@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/4679.1375548434@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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, grv87@yandex.ru
  Subject: Re: BUG #8355: PL/Python 3 can't convert infinity to PostgreSQL's value
  In-Reply-To: <4679.1375548434@sss.pgh.pa.us>
  References: <E1V5C2C-0005EG-L3@wrigleys.postgresql.org> <7861.1375475031@sss.pgh.pa.us> <8645.1375477524@sss.pgh.pa.us> <4679.1375548434@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