Re: casting tsrange to tstzrange doesn't seem to work?

Поиск
Список
Период
Сортировка
От Jeff Davis
Тема Re: casting tsrange to tstzrange doesn't seem to work?
Дата
Msg-id 1373072826.7056.49.camel@jdavis
обсуждение исходный текст
Ответ на casting tsrange to tstzrange doesn't seem to work?  (Joe Van Dyk <joe@tanga.com>)
Ответы Re: casting tsrange to tstzrange doesn't seem to work?  (Joe Van Dyk <joe@tanga.com>)
Список pgsql-general
On Tue, 2013-06-11 at 14:05 -0700, Joe Van Dyk wrote:
> # select tsrange(null)::tstzrange;
> ERROR:  cannot cast type tsrange to tstzrange
> LINE 1: select tsrange(null)::tstzrange;
>
I agree that there should be a cast between tsrange and tstzrange.

Unfortunately, this cant work generally for all range types, because the
total order might be different. For instance, we can't cast between a
textrange and int4range, because:

   ['09','1']

is a valid text range, but:

   [9,1]

is not.

Regards,
    Jeff Davis





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

Предыдущее
От: Ketana Patel
Дата:
Сообщение: Re: General Query on Roles - Reg
Следующее
От: Joe Van Dyk
Дата:
Сообщение: Re: odd locking behaviour