Re: Range Types - typo + NULL string constructor

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org, Erik Rijkers <er(at)xs4all(dot)nl>
Subject: Re: Range Types - typo + NULL string constructor
Date: 2011-09-19 16:48:42
Message-ID: 1316450922.7281.185.camel@jdavis
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, 2011-09-19 at 11:00 -0500, Kevin Grittner wrote:
> On a practical level, our shop is already effectively doing this.
> We have several tables where part of the primary key is "effective
> date" and there is a null capable "expiration date" -- with a NULL
> meaning that no expiration date has been set. It would be nice to
> be able to have a "generated column" function which used these two
> dates to build a range for exclusion constraints and such.

Agreed, that's a good convenience argument for accepting NULL boundaries
in the constructors.

Underneath though, we don't use NULL semantics (because they don't make
sense for ranges -- in fact, avoiding the need to constantly
special-case NULLs is one of the reasons to use range types). So, we
want to avoid confusion where possible.

Regards,
Jeff Davis

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Marc Cousin 2011-09-19 16:51:38 Review for EXPLAIN and nfiltered
Previous Message Christopher Browne 2011-09-19 16:40:29 Re: Is there really no interest in SQL Standard?