Re: [BUGS] BUG #8355: PL/Python 3 can't convert infinity to PostgreSQL's value

2013-08-05 Thread Basil Peace
I based on the documentation of PostgreSQL   (http://www.postgresql.org/docs/9.2/static/datatype-numeric.html#DATATYPE-FLOAT) which says about 'Infinity' and '-Infinity' and doesn't mention other possible spellings, including 'inf'. And on my installation of 9.2.4 'inf' doesn't work too (as I sup

Re: [BUGS] BUG #8355: PL/Python 3 can't convert infinity to PostgreSQL's value

2013-08-03 Thread Tom Lane
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

Re: [BUGS] BUG #8355: PL/Python 3 can't convert infinity to PostgreSQL's value

2013-08-02 Thread Tom Lane
I wrote: > ... further experimentation says that this doesn't work on my ancient > HPUX box; and you're complaining about Windows. So what we've got here > is a platform dependency in the behavior of strtod(). I don't think > we can promise to hide all such dependencies, but maybe it'd be a good

Re: [BUGS] BUG #8355: PL/Python 3 can't convert infinity to PostgreSQL's value

2013-08-02 Thread Tom Lane
gr...@yandex.ru writes: > PL/Python can't convert Python's float with infinity value to PostgreSQL's > float. > The reason is that Python's standard representation of infinity is 'inf' > ('Infinity' is accepted as well), but PostgreSQL's representation is > 'Infinity' only. Hmm, I was about to con