Re: BUG #9843: interval data type storage size (8.1 later)

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: nuko(dot)yokohama(at)gmail(dot)com
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #9843: interval data type storage size (8.1 later)
Date: 2014-04-09 01:05:09
Message-ID: 20140409010509.GF8685@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Thu, Apr 3, 2014 at 08:46:28AM +0000, nuko(dot)yokohama(at)gmail(dot)com wrote:
> The following bug has been logged on the website:
>
> Bug reference: 9843
> Logged by: nuko yokohama
> Email address: nuko(dot)yokohama(at)gmail(dot)com
> PostgreSQL version: 9.3.4
> Operating system: CentOS 6.3
> Description:
>
> Hi.
>
> PostgreSQL 9.3 document in "Table 8-9" of "8.5. Date / Time Types", storage
> size of the interval data type has 12 bytes.
> However, the definition of "datatype / timestamp.h", size of the interval
> data type was 16 bytes.
> In addition, interval data type was 16 bytes even dump the results of the
> table file.

This will be fixed in 9.4 with this patch:

commit 146604ec43bcd6f977c31775a91022cf9737daf5
Author: Bruce Momjian <bruce(at)momjian(dot)us>
Date: Thu Jan 30 09:41:43 2014 -0500

Add checks for interval overflow/underflow

New checks include input, month/day/time internal adjustments, addition,
subtraction, multiplication, and negation. Also adjust docs to
correctly specify interval size in bytes.

Report from Rok Kralj

I am not sure why this was not fixed earlier.

> "day" field to the interval data type is added in PostgreSQL 8.1, but do not
> not been reflected in the document PostgreSQL at that time?

Uh, can you show me a sentence where it is missing? I don't see it.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ Everyone has their own god. +

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message bashtanov 2014-04-09 05:12:46 BUG #9923: "reassign owned" does not change permissions grantor
Previous Message fburgess 2014-04-08 22:17:44 Re: Configuring Standby Server in PostgreSQL 9.3.3