Message-ID: From: "austb (@austb)" To: "pgjdbc/pgjdbc" Date: Wed, 13 Aug 2025 14:14:46 +0000 Subject: Re: [pgjdbc/pgjdbc] PR #3760: fix: Issue #3757 PreparedStatement.toString fails for hex encoded bytea parameter In-Reply-To: References: List-Id: X-GitHub-Author-Login: austb X-GitHub-Comment-Id: 3184114446 X-GitHub-Comment-Type: issue_comment X-GitHub-Issue: 3760 X-GitHub-Repo: pgjdbc/pgjdbc X-GitHub-Type: comment X-GitHub-Url: https://github.com/pgjdbc/pgjdbc/pull/3760#issuecomment-3184114446 Content-Type: text/plain; charset=utf-8 I don't think the whitespace handling is necessary, folks could always construct their strings to not have whitespace, but it is part of what postgresql allows in its queries, so if this wants to support any query it would need to. ``` select '\x AA BB CC'::bytea; bytea ---------- \xaabbcc (1 row) ``` https://www.postgresql.org/docs/17/datatype-binary.html#DATATYPE-BINARY-BYTEA-HEX-FORMAT > For input, the hexadecimal digits can be either upper or lower case, and whitespace is permitted between digit pairs (but not within a digit pair nor in the starting \x sequence).