pgjdbc/pgjdbc GitHub issues and pull requests (mirror)
help / color / mirror / Atom feedFrom: vlsi (@vlsi) <[email protected]>
To: pgjdbc/pgjdbc <[email protected]>
Subject: Re: [pgjdbc/pgjdbc] PR #4063: fix: getCharacterStream wraps String in StringReader
Date: Mon, 11 May 2026 07:56:48 +0000
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
> if someone actually casts it to CharArrayReader in their code then it will break their code
That is fair. `CharArrayReader` has been sitting there since 2002.
On the other hand, `CharArrayReader` adds no new methods, and its `char[] buf` is protected, so I am leaning towards patch-level change. If we treat this as minor, then we would have to bump minor in virtually every change we make, which would render "minor bump" useless for the users.
Frankly, I see two options:
* We could consider this as an internal/bugfix/almost backward-compatible change. In that case we just fix it.
* We could consider this as a user-visible/non backward-compatible change. In that case we should rather add an option to allow users switching to the new default, and after 2 years we could flip the default.
I would accept either way (we shouldn't spent time on discussing the trivial changes), however, I would prefer just fix it as it is unlikely to break users' code.
---
There's yet another possibility: the resultset holds `byte[]` + `encoding`. @dfa1 , have you evaluated/profiled the approach of using `new InputStreamReader(new ByteArrayInputStream(bytes), charset)` approach?
view thread (14+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: github://pgjdbc/pgjdbc
Cc: [email protected], [email protected]
Subject: Re: [pgjdbc/pgjdbc] PR #4063: fix: getCharacterStream wraps String in StringReader
In-Reply-To: <<[email protected]>>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox