Message-ID: From: "davecramer (@davecramer)" To: "pgjdbc/pgjdbc" Date: Mon, 11 Aug 2025 21:53:25 +0000 Subject: Re: [pgjdbc/pgjdbc] issue #3757: PreparedStatement.toString() fails for bytea parameters with at least 42.7.7 In-Reply-To: References: List-Id: X-GitHub-Author-Login: davecramer X-GitHub-Comment-Id: 3177008244 X-GitHub-Comment-Type: issue_comment X-GitHub-Issue: 3757 X-GitHub-Repo: pgjdbc/pgjdbc X-GitHub-Type: comment X-GitHub-Url: https://github.com/pgjdbc/pgjdbc/issues/3757#issuecomment-3177008244 Content-Type: text/plain; charset=utf-8 I just tried ``` public static void main(String[] args) throws Exception { try (Connection connection = DriverManager.getConnection(DB_URL, DB_USERNAME, DB_PASSWORD)) { try (Statement statement = connection.createStatement()) { statement.execute("create table if not exists btable(b bytea)"); } try (PreparedStatement pstmt = connection.prepareStatement("insert into btable(b) values(?)")) { PGobject pg = new PGobject(); pg.setType("bytea"); pg.setValue("\\xabcdef"); pstmt.setObject(1, pg); pstmt.executeUpdate(); } } } ``` with 42.7.7 and it works fine.