Message-ID: From: "vlsi (@vlsi)" To: "pgjdbc/pgjdbc" Date: Mon, 17 Nov 2025 07:41:29 +0000 Subject: Re: [pgjdbc/pgjdbc] PR #3866: perf: optimize PGInterval.getValue() by replacing String.format with StringBuilder In-Reply-To: References: List-Id: X-GitHub-Author-Login: vlsi X-GitHub-Comment-Id: 3540366168 X-GitHub-Comment-Type: issue_comment X-GitHub-Edited-At: 2025-11-17T08:33:10Z X-GitHub-Issue: 3866 X-GitHub-Repo: pgjdbc/pgjdbc X-GitHub-Type: comment X-GitHub-Url: https://github.com/pgjdbc/pgjdbc/pull/3866#issuecomment-3540366168 Content-Type: text/plain; charset=utf-8 I found a bug: `PGInterval(..., 1.9999998)` yields `wholeSeconds=1` and `microSeconds=1000000` which is effectively an extra second. The bug does not affect old code much: `.getSeconds()` returned 2.0, and `getValue()` used `2.0` as well.