From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com> |
Cc: | Bruno Wolff III <bruno(at)wolff(dot)to>, Jim Buttafuoco <jim(at)contactbda(dot)com>, David Rysdam <drysdam(at)ll(dot)mit(dot)edu>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: [GENERAL] missing something obvious about intervals? |
Date: | 2005-12-13 04:07:58 |
Message-ID: | 2116.1134446878@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers |
"Jim C. Nasby" <jnasby(at)pervasive(dot)com> writes:
> On Mon, Dec 12, 2005 at 12:34:45PM -0600, Bruno Wolff III wrote:
>> You are better off doing a multiply. Something like:
>> area=> select '2005-12-01'::date + 456.5 * '1 second'::interval;
>> ?column?
>> ------------------------
>> 2005-12-01 00:07:36.50
>> (1 row)
> This comes up often enough that it's probably worth adding a built-in
> function,
The only case I've noticed seeing on a regular basis is Unix timestamp
conversion (ie, the special case where the date is 1970-01-01); and we
did add a built-in function for that in 8.1.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2005-12-13 04:09:01 | Re: Excessive vacuum times |
Previous Message | Jim C. Nasby | 2005-12-13 03:44:01 | Re: Excessive vacuum times |
From | Date | Subject | |
---|---|---|---|
Next Message | Christopher Browne | 2005-12-13 04:28:57 | Re: Cost-based optimizers |
Previous Message | Tom Lane | 2005-12-13 03:39:47 | Re: 7.3 failure on platypus |