Having trouble with Interval computation

Поиск
Список
Период
Сортировка
От Jim Ballard
Тема Having trouble with Interval computation
Дата
Msg-id 000801c10e0e$23951b70$8300a8c0@planet
обсуждение исходный текст
Ответы Re: Having trouble with Interval computation  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-general
I'd like to get the difference between two timestamp columns expressed as an interval with units "year to month."  I believe the standard way to express this is as:
 
   (timestamp1 - timestamp2) year to month
 
But this gives me a syntax error at "year".  I also can't find a way to cast this to the desired interval units.
 
What is the proper way to express this in Postgres?  Will the standard form be supported at some point?
 
Thanks very much,
 
Jim Ballard
 

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

Предыдущее
От: "Thalis A. Kalfigopoulos"
Дата:
Сообщение: Re: SQL for CREATE RULE
Следующее
От: "Thalis A. Kalfigopoulos"
Дата:
Сообщение: Re: PASSWORD() function for postgresql?