Message-ID: From: "victornoel (@victornoel)" To: "pgjdbc/pgjdbc" Date: Wed, 22 Oct 2025 08:24:24 +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: 3431049822 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-3431049822 Content-Type: text/plain; charset=utf-8 Hi, It feels like the jdbc driver is not properly propagating the type of the parameters, for example if I do: ```java var date = java.sql.Date.valueOf(LocalDate.of(2013, 03, 21)); var timestamp = java.sql.Timestamp.valueOf(LocalDateTime.of(2013, 03, 21, 13, 14)); var preparedStatement = conn.prepareStatement("SELECT pg_typeof(?), pg_typeof(?)"); preparedStatement.setDate(1, date); preparedStatement.setTimestamp(2, timestamp); ``` I get the error: ERROR: could not determine data type of parameter $1 This means that the problem is not only with timestamp, but also with date.