Re: Re: Data type confusion

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Re: Re: Data type confusion
Дата
Msg-id web-97664@davinci.ethosmedia.com
обсуждение исходный текст
Ответ на Re: Re: Data type confusion  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-sql
Tom,

> > Hmmm ... does this mean that I couldn't divide '1 year' by '1
> week'?
> 
> That's exactly what it says.

If that's the case, we'd need to create some sort of function to specify
the time unit to output timestamp operation into:

to_weeks(current_timestamp - hire_date) / '2 weeks'

... otherwise division and multiplication operators for time values
don't do us much good, as we'd be forced to integer-ize all intervals
before we can perform any operations on them at all.

-Josh Berkus


______AGLIO DATABASE SOLUTIONS___________________________                                      Josh Berkus Complete
informationtechnology      josh@agliodbs.com  and data management solutions       (415) 565-7293 for law firms, small
businesses       fax 621-2533   and non-profit organizations.      San Francisco
 


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

Предыдущее
От: "Josh Berkus"
Дата:
Сообщение: Re: [warning: largely off-topic] Re: Data type confusion
Следующее
От: Allan Engelhardt
Дата:
Сообщение: [warning: largely off-topic] Re: Data type confusion