Re: Feature request - Add microsecond as a time unit for interval

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: David Tulloh <david(dot)tulloh(at)anu(dot)edu(dot)au>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Feature request - Add microsecond as a time unit for interval
Date: 2006-02-09 15:30:30
Message-ID: 1392.1139499030@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

David Tulloh <david(dot)tulloh(at)anu(dot)edu(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2006-02-09 15:36:15 Re: PostgreSQL 8.0.6 crash
Previous Message Alvaro Herrera 2006-02-09 15:30:26 Re: Upcoming re-releases