pgjdbc/pgjdbc GitHub issues and pull requests (mirror)  
help / color / mirror / Atom feed
From: vlsi (@vlsi) <[email protected]>
To: pgjdbc/pgjdbc <[email protected]>
Subject: Re: [pgjdbc/pgjdbc] issue #3845: Wrong result on equality between Date and Timestamp given as query parameter
Date: Wed, 22 Oct 2025 10:24:00 +0000
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>

> 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.


view thread (17+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: github://pgjdbc/pgjdbc
  Cc: [email protected], [email protected]
  Subject: Re: [pgjdbc/pgjdbc] issue #3845: Wrong result on equality between Date and Timestamp given as query parameter
  In-Reply-To: <<[email protected]>>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox