Windows env returns error while running "select pgstatindex"

Поиск
Список
Период
Сортировка
От Rushabh Lathia
Тема Windows env returns error while running "select pgstatindex"
Дата
Msg-id CAGPqQf0Ldx_Zx_TLEswK0i6ogiN0GUR8--Ub7B6CMwnJQ93_Ww@mail.gmail.com
обсуждение исходный текст
Ответы Re: Windows env returns error while running "select pgstatindex"  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Description:
===========

Error Message " invalid input syntax for type double precision: -1#I" is displayed while running "select pgstatindex"

Issue only getting reproduce on windows environment.

Analysis:
=========

Consider the following testcase to reproduce the issue on windows:

create table test (a  int primary key );

Windows Output:
==============

psql>select pgstatindex('public.test_pkey');
ERROR:  invalid input syntax for type double precision: "-1.#J"

Linux output:
==========

psql=# select pgstatindex('public.test_pkey');
        pgstatindex       
---------------------------
 (2,0,0,0,0,0,0,0,NaN,NaN)
(1 row)

here when we run the select on linux its returning proper result and on windows error coming from float8in() while trying to work for the NaN values.

After debugging I noticed that "0/0" returning NaN on linux but it returns "-1.#JIND0000" on windows. Now when float8in() getting call for such value on windows it ending up with error  "invalid input syntax for type double precision:" as strtod() not able to understand such values.

I added to check into pgstatindex() to avoid "0/0" situation and issue got fixed.

PFA patch for the same.


Thanks,
Rushabh Lathia

EnterpriseDB Corporation
The Enterprise Postgres Company


Website: http://www.enterprisedb.com
EnterpriseDB Blog: http://blogs.enterprisedb.com/
Follow us on Twitter: http://www.twitter.com/enterprisedb


Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Markus Wanner
Дата:
Сообщение: Re: cheaper snapshots redux
Следующее
От: Gokulakannan Somasundaram
Дата:
Сообщение: Re: the big picture for index-only scans