Re: Range types

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Range types
Дата
Msg-id 13202.1260999463@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Range types  (Martijn van Oosterhout <kleptog@svana.org>)
Ответы Re: Range types  (Scott Bailey <artacus@comcast.net>)
Список pgsql-hackers
Martijn van Oosterhout <kleptog@svana.org> writes:
> However, it does seem reasonable to allow people to restrict, either by
> typmod or a check constraint the kinds of values that can be stored in
> a particular column. Then an application can decide which way they want
> their intervals to work and have the database enforce it.

Sure --- the range datatype should absolutely provide inquiry functions
that let you determine all the properties of a range, so something like
"CHECK (is_open_on_right(col))" would work for that.  I'm of the opinion
that we must not usurp typmod for range behavior --- the right thing is
to pass that through to the contained type, just as we do with arrays.

(Note that a range over timestamp(0) would eliminate at least some of
the platform dependencies we've been arguing about.  I'm still quite
dubious that "next timestamp" is anything except evidence that you've
misformulated your problem, though.)
        regards, tom lane


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

Предыдущее
От: Jeff Davis
Дата:
Сообщение: Re: Range types
Следующее
От: Jeff Davis
Дата:
Сообщение: Re: Range types