pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Richard Broersma <richard.broersma@gmail.com>
To: John Fabiani <johnf@jfcomputer.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Dates and NULL's`
Date: Tue, 10 May 2011 10:16:21 -0700
Message-ID: <BANLkTina8jK3f_p0xynxgzQhpL2aCUsL6A@mail.gmail.com> (raw)
In-Reply-To: <201105100948.41392.johnf@jfcomputer.com>
References: <201105100948.41392.johnf@jfcomputer.com>

On Tue, May 10, 2011 at 9:48 AM, John Fabiani <johnf@jfcomputer.com> wrote:

> Where mydate >= "2011/04/01"::date and mydate<= "2011/04/30"::date
> With the above where will the NULL's be selected????


Here is what I get when I try:

spi=> SELECT NULL::DATE >= '2011-04-01'::DATE AND NULL::DATE <=
'2011-04-30'::DATE;
 ?column?
----------

(1 row)


spi=> SELECT (NULL::DATE >= '2011-04-01'::DATE AND NULL::DATE <=
'2011-04-30'::DATE) IS TRUE;
 ?column?
----------
 f
(1 row)


spi=> SELECT (NULL::DATE >= '2011-04-01'::DATE AND NULL::DATE <=
'2011-04-30'::DATE) IS FALSE;
 ?column?
----------
 f
(1 row)


spi=> SELECT (NULL::DATE >= '2011-04-01'::DATE AND NULL::DATE <=
'2011-04-30'::DATE) IS UNKNOWN;
 ?column?
----------
 t
(1 row)




-- 
Regards,
Richard Broersma Jr.



view thread (10+ messages)  latest in thread

Message-ID: <BANLkTina8jK3f_p0xynxgzQhpL2aCUsL6A@mail.gmail.com>
Permalink:  ../BANLkTina8jK3f_p0xynxgzQhpL2aCUsL6A@mail.gmail.com/
Also on:    postgresql.org/message-id/BANLkTina8jK3f_p0xynxgzQhpL2aCUsL6A@mail.gmail.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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: richard.broersma@gmail.com, johnf@jfcomputer.com
  Subject: Re: Dates and NULL's`
  In-Reply-To: <BANLkTina8jK3f_p0xynxgzQhpL2aCUsL6A@mail.gmail.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