Re: Need help with sql select on null dates! - Mailing list pgsql-general

From Bruno Wolff III
Subject Re: Need help with sql select on null dates!
Date
Msg-id 20021126140824.GA31105@wolff.to
Whole thread Raw
In response to Need help with sql select on null dates!  (Jeff Sacksteder <jwsacksteder@ramprecision.com>)
List pgsql-general
On Tue, Nov 26, 2002 at 08:47:02 -0500,
  Jeff Sacksteder <jwsacksteder@ramprecision.com> wrote:
> I'm having trouble doing a select on empty date fields.

Can you be more precise in what you mean by "empty"? Do you mean NULL?

> Suppose my table is composed of employee_number(char), hire_date(date), and
> termination_date(date).
> I would expect to be able to say:
>
>     'select * from employee_tables where termination_date = null'
> or:
>     'select * from employee_tables where isfinite(termination_date) <>
> 1'
>
> ...but no luck. What is the proper way to select undefined dates?

Neither of the about will return rows with termination_date null in recent
versions of postgres. If the value you are trying to match is null, then
using "is null" instead of "= null".

pgsql-general by date:

Previous
From: "Peter Alberer"
Date:
Subject: pgsql-function called twice in the same second -> Double Insert -> Error
Next
From: Doug McNaught
Date:
Subject: Re: process time of update