Re: Issue with point_ops and NaN

From: Julien Rouhaud <rjuju123(at)gmail(dot)com>
To: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
Cc: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Issue with point_ops and NaN
Date: 2021-04-03 12:22:06
Message-ID: CAOBaU_ZvJGkAuKqfFxQxnsirpaVci_-S3F3M5M1Wzrq1kGyC=g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Le jeu. 1 avr. 2021 à 15:54, Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> a
écrit :

> On Thu, 2021-04-01 at 09:35 +0900, Kyotaro Horiguchi wrote:
> > > > > > > > > SELECT point('NaN','NaN') <@
> polygon('(0,0),(1,0),(1,1),(0,0)');
> > > > > > > > > ?column?
> > > > > > > > > ----------
> > > > > > > > > t
> > > > > > > > > (1 row)
> > >
> > > If you think of "NaN" literally as "not a number", then FALSE would
> > > make sense, since "not a number" implies "not a number between 0 and
> 1".
> > > But since NaN is the result of operations like 0/0 or infinity -
> infinity,
> > > NULL might be better.
> > > So I'd opt for NULL too.
> >
> > Thanks. Do you think it's acceptable that returning false instead of
> > NULL as an alternative behavior?
>
> Yes, I think that is acceptable.
>

+1 especially after looking at the poc patch you sent to handle NULLs.

>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Erik Rijkers 2021-04-03 12:28:38 Re: fix old confusing JSON example
Previous Message Erik Rijkers 2021-04-03 12:01:38 fix old confusing JSON example