Re: FW: Re: Part 1 of several - Converting a varchar to an interval - Mailing list pgsql-sql

From aklaver@comcast.net (Adrian Klaver)
Subject Re: FW: Re: Part 1 of several - Converting a varchar to an interval
Date
Msg-id 032620081730.4863.47EA8835000C8D51000012FF22069997359D0A900E04050E@comcast.net
Whole thread Raw
In response to FW: Re: Part 1 of several - Converting a varchar to an interval  (aklaver@comcast.net (Adrian Klaver))
Responses Re: FW: Re: Part 1 of several - Converting a varchar to an interval
List pgsql-sql

-------------- Original message ----------------------
From: Tom Lane <tgl@sss.pgh.pa.us>
> aklaver@comcast.net (Adrian Klaver) writes:
> > select ('134987'::int/1000.00) * interval ' 1 second' ;
> >     ?column?
> >  --------------
> >   00:02:14.987
> >  (1 row)
> 
> Or even easier:
> 
> regression=# select 134987 * interval '1 msec';
>    ?column?   
> --------------
>  00:02:14.987
> (1 row)
> 
> 
>             regards, tom lane

I just tried this  and got the following which is also what I got when using 'millisecond'

Select 134987 * interval '1 msec';
ERROR:  invalid input syntax for type interval: "1 msec"

SELECT version();                                           version
------------------------------------------------------------------------------------------------PostgreSQL 8.2.3 on
i686-pc-linux-gnu,compiled by GCC gcc (GCC) 4.0.3 (Ubuntu 4.0.3-1ubuntu5)
 

--
Adrian Klaver
aklaver@comcast.net


pgsql-sql by date:

Previous
From: aklaver@comcast.net (Adrian Klaver)
Date:
Subject: Re: FW: Re: Part 1 of several - Converting a varchar to an interval
Next
From: Tom Lane
Date:
Subject: Re: FW: Re: Part 1 of several - Converting a varchar to an interval