Re: BUG #18993: [BUG] Unreachable code in pg_next_dst_boundary() - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #18993: [BUG] Unreachable code in pg_next_dst_boundary()
Date
Msg-id 439888.1753108706@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #18993: [BUG] Unreachable code in pg_next_dst_boundary()  (Nathan Bossart <nathandbossart@gmail.com>)
List pgsql-bugs
Nathan Bossart <nathandbossart@gmail.com> writes:
> On Mon, Jul 21, 2025 at 12:29:16PM +0000, PG Bug reporting form wrote:
>> This is unreachable because icycles is assigned directly from tcycles.

> I see the following upstream commit and discussion related to this:

Yeah.  The short answer here is that this code is meant to deal with
cases where time_t is wider than int[64].  Perhaps we're uninterested
in dealing with that case ... but we also don't want to deviate too
far from the upstream tzdb code.  So I'm inclined to leave it alone.
As the function's comment mentions,

 * A function result of -1 indicates failure (this case does not actually
 * occur in our current implementation).

so presumably both "return -1" lines are unreachable.

            regards, tom lane



pgsql-bugs by date:

Previous
From: Nathan Bossart
Date:
Subject: Re: BUG #18993: [BUG] Unreachable code in pg_next_dst_boundary()
Next
From: Laurenz Albe
Date:
Subject: Re: BUG #18964: `ALTER DATABASE ... RESET ...` fails to reset extension parameters that no longer exist