NaN behavior

Lists: pgsql-hackerspgsql-patches
From: Neil Conway <neilc(at)samurai(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: NaN behavior
Date: 2007-01-12 02:04:12
Message-ID: 1168567452.5462.29.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

postgres=# select 'NaN'::numeric = 'NaN'::numeric,
'NaN'::float8 = 'NaN'::float8;
?column? | ?column?
----------+----------
t | t
(1 row)

This behavior is inconsistent with most people's notion of "NaN" -- in
particular, it is inconsistent with IEEE754. I can understand why
Postgres behaves this way, and we probably can't easily change it (if we
want to continue indexing NaN values, that is), but I think it should at
least be discussed in the documentation.

Comments? I'll write up a doc patch, barring any objections.

-Neil


From: Neil Conway <neilc(at)samurai(dot)com>
To: pgsql-patches <pgsql-patches(at)postgresql(dot)org>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] NaN behavior
Date: 2007-01-12 21:57:09
Message-ID: 1168639029.6174.11.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

On Thu, 2007-01-11 at 21:04 -0500, Neil Conway wrote:
> Comments? I'll write up a doc patch, barring any objections.

I'll apply the attached doc patch to CVS tomorrow, barring any
objections.

-Neil

Attachment Content-Type Size
nan_datatype_note-1.patch text/x-patch 3.2 KB

From: Neil Conway <neilc(at)samurai(dot)com>
To: pgsql-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [HACKERS] NaN behavior
Date: 2007-01-14 22:38:50
Message-ID: 1168814330.6174.48.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

On Fri, 2007-01-12 at 16:57 -0500, Neil Conway wrote:
> I'll apply the attached doc patch to CVS tomorrow, barring any
> objections.

Applied.

-Neil