Re: INTERVAL overflow detection is terribly broken - Mailing list pgsql-hackers

From Tom Lane
Subject Re: INTERVAL overflow detection is terribly broken
Date
Msg-id 26785.1390868361@sss.pgh.pa.us
Whole thread Raw
In response to Re: INTERVAL overflow detection is terribly broken  (Bruce Momjian <bruce@momjian.us>)
Responses Re: INTERVAL overflow detection is terribly broken  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
Bruce Momjian <bruce@momjian.us> writes:
> Oh, one odd thing about this patch.  I found I needed to use INT64_MAX,
> but I don't see it used anywhere else in our codebase.  Is this OK?  Is
> there a better way?

Most of the overflow tests in int.c and int8.c are coded to avoid relying
on the MIN or MAX constants; which seemed like better style at the time.
I'm not sure whether relying on INT64_MAX to exist is portable.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: Add min and max execute statement time in pg_stat_statement
Next
From: Kouhei Kaigai
Date:
Subject: Re: Custom Scan APIs (Re: Custom Plan node)