Re: Integer overflow in timestamp_part() - Mailing list pgsql-hackers

From Jim Nasby
Subject Re: Integer overflow in timestamp_part()
Date
Msg-id 56B15921.8020005@BlueTreble.com
Whole thread Raw
In response to Re: Integer overflow in timestamp_part()  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 2/2/16 6:39 PM, Tom Lane wrote:
> I'm inclined to think that a good solution would be to create an
> artificial restriction to not accept years beyond, say, 100000 AD.
> That would leave us with a lot of daylight to not have to worry
> about corner-case overflows in timestamp arithmetic.  I'm not sure
> though where we'd need to enforce such a restriction; certainly in
> timestamp[tz]_in, but where else?

Probably some of the casts (I'd think at least timestamp->timestamptz). 
Maybe timestamp[tz]_recv. Most of the time*pl* functions. :/
-- 
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com



pgsql-hackers by date:

Previous
From: Curtis Ruck
Date:
Subject: Re: PostgreSQL Auditing
Next
From: Fujii Masao
Date:
Subject: Re: Support for N synchronous standby servers - take 2