Re: Range Types: empty ranges

From: Jan Wieck <JanWieck(at)Yahoo(dot)com>
To: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>
Cc: Josh Berkus <josh(at)agliodbs(dot)com>, Jeff Davis <pgsql(at)j-davis(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Range Types: empty ranges
Date: 2011-02-14 15:49:44
Message-ID: 4D594F18.5060302@Yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2/11/2011 1:50 PM, Kevin Grittner wrote:
> Josh Berkus<josh(at)agliodbs(dot)com> wrote:
>
>> if I, in one of my applications, accidentally defined something
>> as having the range '('15:15:00','15:15:00')', I would *want* the
>> database to through an error and not accept it.
>
> I can agree with that, but I think that range '[15:15:00,15:15:00)'
> should be valid as a zero-length range between, for example,
> '[15:00:00,15:15:00)' and '[15:15:00,15:30:00)'.

Does ['15:15:00','15:15:00') make any more sense? Doesn't this
essentially mean

>= '15:15:00' && < '15:15:00'

which again doesn't include a single point on the time line?

Jan

--
Anyone who trades liberty for security deserves neither
liberty nor security. -- Benjamin Franklin

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2011-02-14 16:08:54 Re: Extensions vs PGXS' MODULE_PATHNAME handling
Previous Message Tom Lane 2011-02-14 15:25:18 Re: [HACKERS] "Extension" versus "module"