Message-ID: From: "davecramer (@davecramer)" To: "pgjdbc/pgjdbc" Date: Wed, 28 Aug 2024 19:00:08 +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: davecramer X-GitHub-Comment-Id: 2316054470 X-GitHub-Comment-Type: issue_comment X-GitHub-Issue: 3365 X-GitHub-Repo: pgjdbc/pgjdbc X-GitHub-Type: comment X-GitHub-Url: https://github.com/pgjdbc/pgjdbc/issues/3365#issuecomment-2316054470 Content-Type: text/plain; charset=utf-8 > By the way, it looks like the statement has `InputStream` for a `bytea` placeholder, so `.toString()` consumes the stream, and subsequent `.toString()` calls fail as they can no longer consume the stream. > > Previously, `toString()` returned `?` for `bytea`, so it was not an issue. It looks like the solution here would be to detect `.toString()` and store all the corresponding `InputStreams` buffer so we can replay them. Do we really want to output the input stream in toString()? Seems to me that outputting ? would be fine. Dave