Re: Converting interval to numeric?

Поиск
Список
Период
Сортировка
От Rodolfo J. Paiz
Тема Re: Converting interval to numeric?
Дата
Msg-id 1108406702.5209.26.camel@rodolfo.gt.factorrent.com
обсуждение исходный текст
Ответ на Re: Converting interval to numeric?  (Bruno Wolff III <bruno@wolff.to>)
Ответы Re: Converting interval to numeric?  (Bruno Wolff III <bruno@wolff.to>)
Список pgsql-novice
On Thu, 2005-02-10 at 22:58 -0600, Bruno Wolff III wrote:
> EXTRACT the EPOCH from the difference of the timestamps. This will give
> you the elapsed times in seconds (as a float8 I think).
>

This is unnecessarily complicated, don't you think? Doesn't it make
sense that there should be a way to get an interval "cast" to only hours
or only minutes or only days?

Instead of an interval *always* being shown as "3 days 4 hours 5
minutes", why can't we get "76 hours" or "4565 minutes"? Isn't there a
function to extract, or cast, or something? And if not, should there be?

Cheers,

--
Rodolfo J. Paiz <rpaiz@simpaticus.com>


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

Предыдущее
От: Kjetil Haaland
Дата:
Сообщение: Re: function returning a row
Следующее
От: Deepblues
Дата:
Сообщение: Question on PL/Perl