Re: pgsql 10.19 : "ERROR: cannot convert infinity to numeric" except there is no infinity

Поиск
Список
Период
Сортировка
Искать
От
Adrian Klaver
Тема
Re: pgsql 10.19 : "ERROR: cannot convert infinity to numeric" except there is no infinity
Дата
Msg-id
0d1a9696-db2d-ace7-5879-16fed625386a@aklaver.com
Ответ на
Список
Дерево обсуждения
pgsql 10.19 : "ERROR: cannot convert infinity to numeric" except there is no infinity Achilleas Mantzios <achill@matrix.gatewaynet.com>
Re: pgsql 10.19 : "ERROR: cannot convert infinity to numeric" except there is no infinity Adrian Klaver <adrian.klaver@aklaver.com>
Re: pgsql 10.19 : "ERROR: cannot convert infinity to numeric" except there is no infinity Achilleas Mantzios <achill@matrix.gatewaynet.com>
Re: pgsql 10.19 : "ERROR: cannot convert infinity to numeric" except there is no infinity Adrian Klaver <adrian.klaver@aklaver.com>
Re: pgsql 10.19 : "ERROR: cannot convert infinity to numeric" except there is no infinity Achilleas Mantzios <achill@matrix.gatewaynet.com>
Re: pgsql 10.19 : "ERROR: cannot convert infinity to numeric" except there is no infinity Adrian Klaver <adrian.klaver@aklaver.com>
Re: pgsql 10.19 : "ERROR: cannot convert infinity to numeric" except there is no infinity Adrian Klaver <adrian.klaver@aklaver.com>
Re: pgsql 10.19 : "ERROR: cannot convert infinity to numeric" except there is no infinity "David G. Johnston" <david.g.johnston@gmail.com>
Re: pgsql 10.19 : "ERROR: cannot convert infinity to numeric" except there is no infinity Tom Lane <tgl@sss.pgh.pa.us>
Re: pgsql 10.19 : "ERROR: cannot convert infinity to numeric" except there is no infinity Achilleas Mantzios <achill@matrix.gatewaynet.com>
Re: pgsql 10.19 : "ERROR: cannot convert infinity to numeric" except there is no infinity Achilleas Mantzios <achill@matrix.gatewaynet.com>
Re: pgsql 10.19 : "ERROR: cannot convert infinity to numeric" except there is no infinity "David G. Johnston" <david.g.johnston@gmail.com>
Re: pgsql 10.19 : "ERROR: cannot convert infinity to numeric" except there is no infinity Achilleas Mantzios <achill@matrix.gatewaynet.com>
On 7/19/22 10:26 AM, Achilleas Mantzios wrote:
> Thank you Adrian!

Actually thank:

https://sqlformat.darold.net/

> 
> Στις 19/7/22 18:36, ο/η Adrian Klaver έγραψε:
>> On 7/19/22 03:38, Achilleas Mantzios wrote:
>>
>> I reformatted queries to see thing better.
>>
>>>

>> AND numrange(ceptl.min_alarm::numeric, ceptl.max_alarm::numeric, '()') 
>> @> cept.value::numeric
>> ORDER BY
>>     1;
>>
>> So the above fails. In your title when you say there is no infinity 
>> that means the cept.value, ceptl.min_alarm or ceptl.max_alarm  fields 
>> do not have any '-infinity' or 'infinity' values, correct?
> There is infinity in cept.value , just not in this result set.
> I got confused and wrongly assumed that since the result set (without 
> the filter in the WHERE clause including cept.value::numeric) did not 
> contain any infinity it should also work with the filter in the WHERE 
> clause. Apparently a subplan executes this conversion in the WHERE 
> before the other filters. I did not do any analyze to prove this.
>>

Have you tried:

NULLIF(cept.value, 'inf')::numeric

>>> -- 
>>> Achilleas Mantzios
>>> DBA, Analyst, IT Lead
>>> IT DEPT
>>> Dynacom Tankers Mgmt
>>>
>>
>>
> 
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com


В списке pgsql-general по дате отправления
От: David G. Johnston
Дата:
От: Adrian Klaver
Дата:
FAQ