pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Nathan Bossart <nathandbossart@gmail.com>
Cc: gorcom2012@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18993: [BUG] Unreachable code in pg_next_dst_boundary()
Date: Mon, 21 Jul 2025 10:38:26 -0400
Message-ID: <439888.1753108706@sss.pgh.pa.us> (raw)
In-Reply-To: <aH5OzOYbypP8QFKv@nathan>
References: <18993-fd78c35834306695@postgresql.org>
	<aH5OzOYbypP8QFKv@nathan>

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





view thread (3+ messages)

Message-ID: <439888.1753108706@sss.pgh.pa.us>
Permalink:  ../439888.1753108706@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/439888.1753108706@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, nathandbossart@gmail.com, gorcom2012@gmail.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #18993: [BUG] Unreachable code in pg_next_dst_boundary()
  In-Reply-To: <439888.1753108706@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox