Message-ID: From: "MrEasy (@MrEasy)" To: "pgjdbc/pgjdbc" Date: Mon, 26 Aug 2024 12:06:49 +0000 Subject: Re: [pgjdbc/pgjdbc] issue #3365: EOFException on PreparedStatement#toString with unset bytea parameter since 42.7.4 In-Reply-To: References: List-Id: X-GitHub-Author-Login: MrEasy X-GitHub-Comment-Id: 2310048025 X-GitHub-Comment-Type: issue_comment X-GitHub-Edited-At: 2024-08-26T12:08:50Z X-GitHub-Issue: 3365 X-GitHub-Repo: pgjdbc/pgjdbc X-GitHub-Type: comment X-GitHub-Url: https://github.com/pgjdbc/pgjdbc/issues/3365#issuecomment-2310048025 Content-Type: text/plain; charset=utf-8 > What is the purpose of calling `toString` there then? The ``ConcurrentSkipListMap`` does this for comparing the entries (PLStatement below is a wrapper around PreparedStatement)- not knowing of the characteristics of the object being put into it of course. ``` org.postgresql.util.PSQLException: Unable to convert bytea parameter at position 0 to literal at org.postgresql.core.v3.SimpleParameterList.toString(SimpleParameterList.java:262) ~[?:?] at org.postgresql.core.NativeQuery.toString(NativeQuery.java:58) ~[?:?] at org.postgresql.core.v3.SimpleQuery.toString(SimpleQuery.java:58) ~[?:?] at org.postgresql.jdbc.PgPreparedStatement.toString(PgPreparedStatement.java:1081) ~[?:?] at java.lang.String.valueOf(String.java:4465) ~[?:?] at com.xxx.locator.datasources.PLStatement.toString(PLStatement.java:756) ~[?:?] at com.xxx.locator.datasources.PLStatement.compareTo(PLStatement.java:536) ~[?:?] at com.xxx.locator.datasources.PLStatement.compareTo(PLStatement.java:26) ~[?:?] at java.util.concurrent.ConcurrentSkipListMap.cpr(ConcurrentSkipListMap.java:393) ~[?:?] at java.util.concurrent.ConcurrentSkipListMap.doPut(ConcurrentSkipListMap.java:646) ~[?:?] at java.util.concurrent.ConcurrentSkipListMap.putIfAbsent(ConcurrentSkipListMap.java:1787) ~[?:?] at java.util.concurrent.ConcurrentSkipListSet.add(ConcurrentSkipListSet.java:243) ~[?:?] ```