Re: Range Types - typo + NULL string constructor

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Range Types - typo + NULL string constructor
Дата
Msg-id 2904.1318363046@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Range Types - typo + NULL string constructor  (Florian Pflug <fgp@phlo.org>)
Список pgsql-hackers
Florian Pflug <fgp@phlo.org> writes:
> On Oct11, 2011, at 14:43 , David Fetter wrote:
>> I'd recoil at not having ranges default to left-closed, right-open.
>> The use case for that one is so compelling that I'm OK with making it
>> the default from which deviations need to be specified.

I agree with David on this.

> The downside of that is that, as Tom pointed out upthread, we cannot
> make [) the canonical representation of ranges.

Yeah, we certainly *can* do that, we just have to allow ranges that
include the last element of the domain to be corner cases that require
special handling.  If we don't want to just fail, we have to
canonicalize them to closed instead of open ranges.  It does not follow
that the default on input has to be closed.

Note that the INT_MAX case is probably not the worst issue in practice.
What is going to be an issue is ranges over enum types, where having the
last element being part of the range is a much more likely use-case.
        regards, tom lane


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Dumping roles improvements?
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: B-tree parent pointer and checkpoints