Message-ID: From: "sehrope (@sehrope)" To: "pgjdbc/pgjdbc" Date: Mon, 23 Feb 2026 21:55:55 +0000 Subject: Re: [pgjdbc/pgjdbc] PR #3939: Add RequireServerVersion annotation for tests In-Reply-To: References: List-Id: X-GitHub-Author-Login: sehrope X-GitHub-Comment-Id: 3947543256 X-GitHub-Comment-Type: issue_comment X-GitHub-Issue: 3939 X-GitHub-Repo: pgjdbc/pgjdbc X-GitHub-Type: comment X-GitHub-Url: https://github.com/pgjdbc/pgjdbc/pull/3939#issuecomment-3947543256 Content-Type: text/plain; charset=utf-8 Rebased and force pushed. Adds `@DisabledForServerVersionRange` as well (with no usage yet but ready if someone wants to use it). Added a base parent for both as the majority of the version related code is the same. Each just defines how it matches and whether it's negative or positive result. Also includes checks that: * At least one of lt / lte / gte / gt is populated * Both lt / lte cannot be populated * Both gt / gte cannot be populated To unify the code both are implemented by deciding if we match, and then returning either the enabled or disabled result depending on the annotation. Note that the "matches" logic for the disabled annotation is backwards. If it matches, the test is disabled. The response message is slightly worse than before for the enabled annotation as we only say whether we did not match at all (previously we would explicitly say which of the lt / lte / gte / gt clauses was violated). But that was done because the same approach does not work for the disabled annotation and wanted to keep the code consistent. If someone is investigating can always look at the actual annotations anyway. I'll merge this tomorrow if there's nothing new.