Message-ID: From: "vlsi (@vlsi)" To: "pgjdbc/pgjdbc" Date: Sun, 13 Apr 2025 08:24:56 +0000 Subject: Re: [pgjdbc/pgjdbc] PR #3589: Metadata CHAR_OCTET_LENGTH is a positive number for non-character column types In-Reply-To: References: List-Id: X-GitHub-Author-Login: vlsi X-GitHub-Comment-Id: 2041074220 X-GitHub-Comment-Type: review_comment X-GitHub-Commit: 197c8210934a37454e60ecebccfeaf1468a16f0b X-GitHub-Issue: 3589 X-GitHub-Line: 1999 X-GitHub-Path: pgjdbc/src/test/java/org/postgresql/test/jdbc2/DatabaseMetaDataTest.java X-GitHub-Repo: pgjdbc/pgjdbc X-GitHub-Type: review_comment X-GitHub-Url: https://github.com/pgjdbc/pgjdbc/pull/3589#discussion_r2041074220 Content-Type: text/plain; charset=utf-8 (on pgjdbc/src/test/java/org/postgresql/test/jdbc2/DatabaseMetaDataTest.java:1999) The failure would maks the root cause. In most of the cases, I want to know the exact expected/actual value rather than just the fact "it should not be null". Have you considered something like the following? ```java Integer actual = rs.wasNull() ? null : rs.getInt("CHAR_OCTET_LENGTH"); assertEquals(expected, actual, ...); ```