Re: Range Types: empty ranges

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Re: Range Types: empty ranges
Дата
Msg-id 4D557FCF.3030709@agliodbs.com
обсуждение исходный текст
Ответ на Range Types: empty ranges  (Jeff Davis <pgsql@j-davis.com>)
Ответы Re: Range Types: empty ranges  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Re: Range Types: empty ranges  (Jeff Davis <pgsql@j-davis.com>)
Re: Range Types: empty ranges  ("David E. Wheeler" <david@kineticode.com>)
Список pgsql-hackers
On 2/11/11 10:11 AM, Jeff Davis wrote:
> Thoughts? Do the benefits outweigh the costs?

I guess I'm having trouble tying the concept of empty ranges to any
reality external to the database.

For example, what would the time range:

'('15:15:00','15:15:00')'

... represent exactly?  "A non-existant point in time which might or
might not be near 3:15 PM"?  For my personal use of ranges, I'm very
reluctant to embrace a concept in the database which can't possibly
depict something concrete.

Really, it seems like you're trying to fix NULL by separating the
concept of EMPTY from NULL.  Which is a good idea in general, I'm just
not sure that this is the way to do it.

HOWEVER, I also recognize that range types might be used for scientific
applications, in which the mathematical concepts of imaginary ranges and
empty ranges might be valid.  So I wouldn't want to prohibit this
feature for the people who need it.

BUT ... 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.

So, if we allow empty ranges of this kind, I would want a GUC for
"allow_empty_ranges".

--                                  -- Josh Berkus                                    PostgreSQL Experts Inc.
                        http://www.pgexperts.com
 


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Noah Misch
Дата:
Сообщение: Re: FOR KEY LOCK foreign keys
Следующее
От: Tom Lane
Дата:
Сообщение: Re: ALTER EXTENSION UPGRADE, v3