Skip site navigation (1) Skip section navigation (2)

Re: time + date_part oddness?

From: Thomas Lockhart <lockhart(at)fourpalms(dot)org>
To: Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: time + date_part oddness?
Date: 2001-01-05 06:49:36
Message-ID: 3A556E80.F18AE49B@fourpalms.org (view raw or flat)
Thread:
Lists: pgsql-hackers
> Any thought?

Hmm. It is not consistantly implemented :(

timestamp_part() uses just the fractional part of the seconds to
calculate milliseconds. But interval_part() uses both fractional and
integer parts to figure the result, and that is the routine which ends
up being used for the time value.

I'd assume that it should be using fractional seconds only, just like
timestamp_part() does. Any reason not to change it for 7.1?

btw, what should 'microseconds' return? It suffers from the problems
mentioned already, plus leaves the "milliseconds" part in the result.
That should probably only return the pieces which are less than a
millisecond...

                      - Thomas

In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2001-01-05 07:16:09
Subject: Re: Re: time + date_part oddness?
Previous:From: Tom LaneDate: 2001-01-05 06:18:47
Subject: Well, we seem to be proof against cache-inval problems now

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group