Re: How to handle 'not a number' in postgresql

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: thereverandpdawg <reverandpdawg(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: How to handle 'not a number' in postgresql
Date: 2008-01-04 14:29:47
Message-ID: 20080104142946.GB32055@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Dec 28, 2007 at 10:22:03AM -0800, thereverandpdawg wrote:
> I have some field data which comes off of a data logger. In some cases
> the data is out of bounds of logger or instrumentation. In which case
> it is reported as 'NaN' for 'not a number.'
>
> Is there such a value in postgresql? If not I will have to hack it in
> with a boolean and would rather not do so.

Did you try it?

# select 'nan'::float;
float8
--------
NaN
(1 row)

Have a nice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> Those who make peaceful revolution impossible will make violent revolution inevitable.
> -- John F Kennedy

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2008-01-04 14:31:41 Re: Mandatory AS keyword in SELECT statements
Previous Message Fernando Hevia 2008-01-04 14:01:43 Re: [SQL] Argentinian timezone change at the last moment. How to change pgsql tz db?