Re: fixes for date_part micro/millisecond precision - Mailing list pgsql-patches

From Tom Lane
Subject Re: fixes for date_part micro/millisecond precision
Date
Msg-id 1013.1006924402@sss.pgh.pa.us
Whole thread Raw
In response to fixes for date_part micro/millisecond precision  (Brent Verner <brent@rcfile.org>)
List pgsql-patches
Thomas Lockhart <lockhart@fourpalms.org> writes:
> Yes. Mixing the float with the int seems to invite math troubles though

True, any multi-member struct will be a huge PITA for arithmetic
operations.

Using int8 if available or float8 if not might work pretty nicely
now that I think about it, at least from a coding point of view.
You could hide a lot of the differences in the PG_GET and PG_RETURN
macros.

But do we want to have such a radical difference in accuracy and
range across platforms?

            regards, tom lane

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: fixes for date_part micro/millisecond precision
Next
From: Thomas Lockhart
Date:
Subject: Re: fixes for date_part micro/millisecond precision