Message-ID: From: "vlsi (@vlsi)" To: "pgjdbc/pgjdbc" Date: Mon, 11 Aug 2025 18:28:13 +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: vlsi X-GitHub-Comment-Id: 3176296967 X-GitHub-Comment-Type: issue_comment X-GitHub-Edited-At: 2025-08-11T18:44:26Z X-GitHub-Issue: 3757 X-GitHub-Repo: pgjdbc/pgjdbc X-GitHub-Type: comment X-GitHub-Url: https://github.com/pgjdbc/pgjdbc/issues/3757#issuecomment-3176296967 Content-Type: text/plain; charset=utf-8 Here's my attempt to optimize it via ChatGPT: https://chatgpt.com/share/689a3548-60f4-800f-bab8-6550415687c4 That was "5 thinking" model, and I still had to ask it multiple times to remove allocations. At the same time, it was able to apply a hack from Netty when I mentioned the relevant netty PR. I wish it was able to know that trick on its own though. Claude Opus 4.1 generates pretty much the same thing (it does care to suggest an implementation to validate and an implementation to parse the hex): https://claude.ai/share/92589422-3a8f-4516-beee-c830591e02cc I haven't benchmarked the implementations though.