Re: Range Types: empty ranges

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: Range Types: empty ranges
Дата
Msg-id 4D5534D0020000250003A87E@gw.wicourts.gov
обсуждение исходный текст
Ответ на Re: Range Types: empty ranges  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: Range Types: empty ranges  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Re: Range Types: empty ranges  (Jeff Davis <pgsql@j-davis.com>)
Список pgsql-hackers
Robert Haas <robertmhaas@gmail.com> wrote:
>> 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)'.
> 
> How would that actually work?  I kind of agree with Josh: I'd be
> inclined to make the type input function boot such constructs at
> the door.
It makes more sense in the context of a range of some type with a
clearly defined granularity.  Our accounting system, for example,
can assign a new range of receipt IDs for each calendar year.  If
you want a variable to represent the receipts for traffic receipts
for 2012, you might, in preparation for the upcoming year, define
something to declare the range as '[12TR000001,12TR000001)'.  When
the first receipt is assigned as 12TR000001, that is updated to
'[12TR000001,12TR000002)'.  Just as an off-the-cuff example.
Basically, with a type having well-defined granularity, a [) range
could usefully represent, "start to last used", and start out empty.
-Kevin


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

Предыдущее
От: Jeff Davis
Дата:
Сообщение: Re: Range Types: empty ranges
Следующее
От: Greg Smith
Дата:
Сообщение: Re: Debian readline/libedit breakage