nulls

From: "James B(dot) Byrne" <byrnejb(at)harte-lyne(dot)ca>
To: pgsql-general(at)postgresql(dot)org
Subject: nulls
Date: 2009-03-12 15:32:59
Message-ID: 45783.216.185.71.24.1236871979.squirrel@webmail.harte-lyne.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


I am confronting a design decision involving null values and I
cannot seem to discern which way to go. Therefore, I would like
some commentary based on real world experience.

The basic issue is episodic duration, expressed as columns named
dt_effective_from and dt_superseded_after. Both are datetime types
containing values normalized to utc. You see where this is going.

The issue is what to enter when the value is known to be unknown, as
in some indeterminate future date, which may be never. I read that
relational set values should never be null, as null is indeterminate
for WHERE clauses and may result in unexpected results. On the
other hand, setting some artificially excessive future date seems in
its place seems, to me, to have its own problems.

Since this issue must have been dealt with time and time again in
the past I would like to know what, if any, consensus has been
reached on the matter. What is the best way to proceed?

--
*** E-Mail is NOT a SECURE channel ***
James B. Byrne mailto:ByrneJB(at)Harte-Lyne(dot)ca
Harte & Lyne Limited http://www.harte-lyne.ca
9 Brockley Drive vox: +1 905 561 1241
Hamilton, Ontario fax: +1 905 561 0757
Canada L8E 3C3

Responses

  • Re: nulls at 2009-03-12 16:00:06 from Richard Huxton
  • Re: nulls at 2009-03-12 16:04:34 from justin
  • Re: nulls at 2009-03-12 16:17:08 from Bill Moran
  • Re: nulls at 2009-03-12 18:16:35 from Jeff Davis

Browse pgsql-general by date

  From Date Subject
Next Message Greg Sabino Mullane 2009-03-12 15:50:11 Re: How to get the PID associated with a Perl DBI dbh?
Previous Message A. Kretschmer 2009-03-12 14:55:32 Re: How to get the PID associated with a Perl DBI dbh?