Re: Time handling in pgsql. (fwd)

Поиск
Список
Период
Сортировка
От Jeff MacDonald
Тема Re: Time handling in pgsql. (fwd)
Дата
Msg-id FJENKCLABGGBKBDGHOJJGEPGCAAA.jeff@interchange.ca
обсуждение исходный текст
Ответ на Re: Time handling in pgsql. (fwd)  ("Jeff MacDonald" <jeff@interchange.ca>)
Список pgsql-general
Ok, I found what I wanted.

You can use extract epoch on intervals.

SELECT sum(EXTRACT(EPOCH FROM age(endtime,starttime))) FROM tracking GROUP
BY uwid;

The query above works.

>> -----Original Message-----
>> From: pgsql-general-owner@postgresql.org
>> [mailto:pgsql-general-owner@postgresql.org]On Behalf Of Jeff MacDonald
>> Sent: Tuesday, April 22, 2003 1:20 PM
>> To: nolan@celery.tssi.com; pgsql general list
>> Subject: Re: [GENERAL] Time handling in pgsql. (fwd)
>>
>>
>> Actually I'd be happy if i could simply do this
>>
>> SELECT age(start,end)::seconds From foo;
>>
>> or something very close to that. Then i could process
>> the rest in perl.
>>
>> Jeff.
>>
>> >> From: pgsql-general-owner@postgresql.org
>> >> [mailto:pgsql-general-owner@postgresql.org]On Behalf Of
>> >> nolan@celery.tssi.com
>> >> Subject: [GENERAL] Time handling in pgsql. (fwd)
>>
>> >> It would be great if the 'age' function could be supplied a formatting
>> >> string so that you could format the data any way you want.
>>
>> >> Within that function convert both timestamps into seconds, do
>> >> the arithmetic and return the number of seconds.
>> >>
>>
>>
>> ---------------------------(end of broadcast)---------------------------
>> TIP 5: Have you checked our extensive FAQ?
>>
>> http://www.postgresql.org/docs/faqs/FAQ.html
>>


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

Предыдущее
От: Dennis Gearon
Дата:
Сообщение: Re: > 16TB worth of data question
Следующее
От: Sean Chittenden
Дата:
Сообщение: Re: > 16TB worth of data question