Message-ID: From: "victornoel (@victornoel)" To: "pgjdbc/pgjdbc" Date: Wed, 22 Oct 2025 10:11:30 +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: victornoel X-GitHub-Comment-Id: 3431545374 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-3431545374 Content-Type: text/plain; charset=utf-8 > Oid.DATE, Oid.TIMESTAMP, and Oid.TIMESTAMPTZ differ. > At the same time, it is hard to tell if .setTimestamp means TIMESTAMP or TIMESTAMPTZ. So basically, this is a known behaviour of the driver and there is no way to improve it? Thanks for the explanation, it's unfortunate because it's very error-prone, but I guess we have no real choice here. > Is there anything stopping you from using java.time with Hibernate? 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 :) But the easy workaround is to use a cast. I may check if the currently supported version of Hibernate still have this problem (we are stuck with v5) and if they do I will report a bug there. Feel free to close this ticket if you think there is nothing more that can be done on the driver side :)