Re: Feature request - Add microsecond as a time unit for interval - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Feature request - Add microsecond as a time unit for interval
Date
Msg-id 1392.1139499030@sss.pgh.pa.us
Whole thread Raw
In response to Feature request - Add microsecond as a time unit for interval  (David Tulloh <david.tulloh@anu.edu.au>)
Responses Re: Feature request - Add microsecond as a time unit for interval
Re: Feature request - Add microsecond as a time unit for
List pgsql-hackers
David Tulloh <david.tulloh@anu.edu.au> writes:
> To insert microseconds I have to use the following line, ($1*0.000001 || 
> ' seconds')::interval

Actually, the preferred way to do that is to use the numeric-times-interval
operator, eg

regression=# select 7 * '0.000001 second'::interval;   ?column?
-----------------00:00:00.000007
(1 row)

This generalizes to any scale factor you care to use, eg fortnights...
so I don't see a pressing need to add microseconds.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Upcoming re-releases
Next
From: Tom Lane
Date:
Subject: Re: PostgreSQL 8.0.6 crash