pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Edmar Wiggers <edmar@brasmap.com>
To: pgsql-sql@postgresql.org
To: pgsql-bugs@postgresql.org
Subject: Unable to convert null timestamp to date. Bug?
Date: Thu, 7 Dec 2000 21:08:09 -0200
Message-ID: <NEBBIAKDCDHFGJMLHCKIMEPKCBAA.edmar@brasmap.com> (raw)


Strange, this works:
  select * from users where last_visit > now() + 7; 
  -- last_visit is nullable, of type timestamp

But this doesn't
  select * from users where last_visit + 7 > now();
  ERROR:  Unable to convert null timestamp to date
  -- yes, there are users where last_visit IS NULL

BTW, this works too:
  select null+1; -- obviously returns NULL

System is FreeBSD 4.1, PgSQL 7.0.2

Anyone got a clue?

Yours sincerely,

Edmar Wiggers
BRASMAP Information Systems
+55 48 9960 2752



view thread (2+ messages)  latest in thread

Message-ID: <NEBBIAKDCDHFGJMLHCKIMEPKCBAA.edmar@brasmap.com>
Permalink:  ../NEBBIAKDCDHFGJMLHCKIMEPKCBAA.edmar@brasmap.com/
Also on:    postgresql.org/message-id/NEBBIAKDCDHFGJMLHCKIMEPKCBAA.edmar@brasmap.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: edmar@brasmap.com, pgsql-bugs@postgresql.org
  Subject: Re: Unable to convert null timestamp to date. Bug?
  In-Reply-To: <NEBBIAKDCDHFGJMLHCKIMEPKCBAA.edmar@brasmap.com>
  References: <NEBBIAKDCDHFGJMLHCKIMEPKCBAA.edmar@brasmap.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox