Re: [PATCH] Integer overflow in timestamp[tz]_part() and date/time boundaries check

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Vitaly Burovoy <vitaly(dot)burovoy(at)gmail(dot)com>
Cc: Mark Dilger <hornschnorter(at)gmail(dot)com>, David Steele <david(at)pgmasters(dot)net>, Anastasia Lubennikova <a(dot)lubennikova(at)postgrespro(dot)ru>, Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] Integer overflow in timestamp[tz]_part() and date/time boundaries check
Date: 2016-03-16 17:24:16
Message-ID: 6489.1458149056@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I wrote:
> My feeling is we ought to preserve the old behavior here, which would
> involve making JULIAN_MAXYEAR_FOR_TIMESTAMPS format-dependent and
> adjusting the float values for the two derived constants; not much of a
> problem code-wise. I think though that it would break quite a number of
> the proposed new regression tests for the float case. TBH, I thought
> the number of added test cases was rather excessive anyway, so I wouldn't
> have a problem with just leaving out whichever ones don't pass with both
> build options.

Actually, it seems a lot of the provided test cases fail for float
timestamps anyway; there's an assumption that
294276-12-31 23:59:59.999999
294277-01-01 00:00:00.000000
are distinct timestamps, which they are not in float mode.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2016-03-16 17:27:14 Re: Pushdown target list below gather node (WAS Re: WIP: Upper planner pathification)
Previous Message Julien Rouhaud 2016-03-16 17:23:45 Re: Choosing parallel_degree