Message-ID: From: "vlsi (@vlsi)" To: "pgjdbc/pgjdbc" Date: Wed, 22 Oct 2025 10:24:00 +0000 Subject: Re: [pgjdbc/pgjdbc] issue #3845: Wrong result on equality between Date and Timestamp given as query parameter In-Reply-To: References: List-Id: X-GitHub-Author-Login: vlsi X-GitHub-Comment-Id: 3431611332 X-GitHub-Comment-Type: issue_comment X-GitHub-Issue: 3845 X-GitHub-Repo: pgjdbc/pgjdbc X-GitHub-Type: comment X-GitHub-Url: https://github.com/pgjdbc/pgjdbc/issues/3845#issuecomment-3431611332 Content-Type: text/plain; charset=utf-8 > So basically, this is a known behaviour of the driver and there is no way to improve it? I'm afraid it would be extremely hard to improve the behavior due to backward compatibility reasons. > it's very error-prone This is fair. I've filed an enhancement request for error-prone: https://github.com/google/error-prone/issues/5291 >Nothing, the problem is Hibernate itself, it's implementing the use of those types by converting them to java.sql.Timestamp before calling setTimestamp on the statement :) Is it really the case? Frankly, I think pgjdbc supports `java.time` for quite some time already, and ORMs should migrate to that API as it is a much cleaner mapping between Java and database types. If Hibernate still uses `java.sql`, I would suggest filing a ticket to make them migrate to `java.time` instead. They should raise warnings if the application still uses `java.sql` fields.