Re: No Interval Conversion Function in 7.2?!!?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: No Interval Conversion Function in 7.2?!!?
Дата
Msg-id 17020.1013819596@sss.pgh.pa.us
обсуждение исходный текст
Ответ на No Interval Conversion Function in 7.2?!!?  ("Josh Berkus" <josh@agliodbs.com>)
Ответы Re: No Interval Conversion Function in 7.2?!!?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-sql
"Josh Berkus" <josh@agliodbs.com> writes:
> Please help!  I just upgraded a production database to PostgreSQL 7.2,
>  and discovered that INTERVAL() is no longer a function.  What replaced
>  it?  How can I convert VARCHAR to Interval?

It's still there, but INTERVAL is a reserved word these days.
"INTERVAL"(varcharvalue)
varcharvalue::interval
CAST(varcharvalue AS interval)

should all give the same results.  Only the last of these is actually
standard.
        regards, tom lane


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

Предыдущее
От: "Josh Berkus"
Дата:
Сообщение: No Interval Conversion Function in 7.2?!!?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: No Interval Conversion Function in 7.2?!!?