Re: Re: Data type confusion

From: "Josh Berkus" <josh(at)agliodbs(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Josh Berkus" <josh(at)agliodbs(dot)com>
Cc: Allan Engelhardt <allane(at)cybaea(dot)com>, pgsql-sql(at)postgresql(dot)org
Subject: Re: Re: Data type confusion
Date: 2001-08-06 22:21:22
Message-ID: web-97664@davinci.ethosmedia.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 information technology josh(at)agliodbs(dot)com
and data management solutions (415) 565-7293
for law firms, small businesses fax 621-2533
and non-profit organizations. San Francisco

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Allan Engelhardt 2001-08-06 22:39:27 [warning: largely off-topic] Re: Data type confusion
Previous Message Tom Lane 2001-08-06 22:14:30 Re: Re: Data type confusion