@@ -2800,15 +2800,18 @@ P <optional> <replaceable>years</replaceable>-<replaceable>months</replaceable>-
2800
2800
</para>
2801
2801
2802
2802
<para>
2803
- In the verbose input format, and in some fields of the more compact
2804
- input formats, field values can have fractional parts; for example
2805
- <literal>'1.5 week'</literal> or <literal>'01:02:03.45'</literal>. Such input is
2806
- converted to the appropriate number of months, days, and seconds
2807
- for storage. When this would result in a fractional number of
2808
- months or days, the fraction is added to the lower-order fields
2809
- using the conversion factors 1 month = 30 days and 1 day = 24 hours.
2810
- For example, <literal>'1.5 month'</literal> becomes 1 month and 15 days.
2811
- Only seconds will ever be shown as fractional on output.
2803
+ Field values can have fractional parts: for example, <literal>'1.5
2804
+ weeks'</literal> or <literal>'01:02:03.45'</literal>. However,
2805
+ because interval internally stores only three integer units (months,
2806
+ days, microseconds), fractional units must be spilled to smaller
2807
+ units. Fractional parts of units greater than months is truncated to
2808
+ be an integer number of months, e.g. <literal>'1.5 years'</literal>
2809
+ becomes <literal>'1 year 6 mons'</literal>. Fractional parts of
2810
+ weeks and days are computed to be an integer number of days and
2811
+ microseconds, assuming 30 days per month and 24 hours per day, e.g.,
2812
+ <literal>'1.75 months'</literal> becomes <literal>1 mon 22 days
2813
+ 12:00:00</literal>. Only seconds will ever be shown as fractional
2814
+ on output.
2812
2815
</para>
2813
2816
2814
2817
<para>
@@ -2852,10 +2855,10 @@ P <optional> <replaceable>years</replaceable>-<replaceable>months</replaceable>-
2852
2855
2853
2856
<para>
2854
2857
Internally <type>interval</type> values are stored as months, days,
2855
- andseconds . This is done because the number of days in a month
2858
+ andmicroseconds . This is done because the number of days in a month
2856
2859
varies, and a day can have 23 or 25 hours if a daylight savings
2857
2860
time adjustment is involved. The months and days fields are integers
2858
- while theseconds field can storefractions . Because intervals are
2861
+ while themicroseconds field can storefractional seconds . Because intervals are
2859
2862
usually created from constant strings or <type>timestamp</type> subtraction,
2860
2863
this storage method works well in most cases, but can cause unexpected
2861
2864
results: