Thread: '13 months ago'::reltime

'13 months ago'::reltime

From
"Albert REINER"
Date:
Saluton,

I do not quite understand the following:

,----
| albert=> select '13 months ago'::reltime;
|     ?column?
| ---------------------
|  1 year 25 00:00 ago
| (1 row)
| 
| albert=> select '13 months ago'::interval;
|       ?column?
| ------------------------
|  1 year 1 mon 00:00 ago
| (1 row)
| 
| albert=> select version();
|                 version
| --------------------------------------------------------------------
|  PostgreSQL 7.0.2 on i586-pc-linux-gnulibc1, compiled by gcc 2.95.1
| (1 row)
`----

Shouldn't 13 months be 1 year and 1 month even for reltime?

Somewhat puzzled,

Albert.



Re: '13 months ago'::reltime

From
Tom Lane
Date:
Type reltime is old and deprecated.  Don't use it.
        regards, tom lane


Re: '13 months ago'::reltime

From
Christopher Sawtell
Date:
On Friday 04 May 2001 06:32, you wrote:
> Type reltime is old and deprecated.  Don't use it.

What should we be using instead?

-- 
Sincerely etc.,
NAME       Christopher SawtellCELL PHONE 021 257 4451ICQ UIN    45863470EMAIL      csawtell @ xtra . co . nzCNOTES
ftp://ftp.funet.fi/pub/languages/C/tutorials/sawtell_C.tar.gz
-->> Please refrain from using HTML or WORD attachments in e-mails to me <<--



Re: '13 months ago'::reltime

From
Peter Eisentraut
Date:
Christopher Sawtell writes:

> On Friday 04 May 2001 06:32, you wrote:
> > Type reltime is old and deprecated.  Don't use it.
>
> What should we be using instead?

interval

-- 
Peter Eisentraut   peter_e@gmx.net   http://funkturm.homeip.net/~peter