Re: Casting varchar to interval.?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Casting varchar to interval.?
Дата
Msg-id 8152.1075135077@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Casting varchar to interval.?  (Richard Huxton <dev@archonet.com>)
Список pgsql-general
Richard Huxton <dev@archonet.com> writes:
> The trim() is probably a coincidence (although I haven't tested extensively).
> The issue is that there is a cast from text => interval but not from varchar.
> The solution is to do something like:
>   config_value::text::interval

The reason trim() works is that its result is of type text.  A simple
cast is a more efficient solution though.

> This might be fixed in 7.4.1, but you'll need to check.

No, the cast still isn't there.  You could add it yourself though, see
CREATE CAST.

            regards, tom lane

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

Предыдущее
От: Greg Stark
Дата:
Сообщение: Re: FAQ (disk space)
Следующее
От: Lamar Owen
Дата:
Сообщение: Re: I can't upgrade to PostgreSQL 7.4 in RedHat 9.0