Skip to content
Snippets Groups Projects
Commit 47b8f1ab authored by Christoph Berg's avatar Christoph Berg 📡
Browse files

Fix org.postgresql.util.PSQLException: Unable to convert bytea parameter at...

Fix org.postgresql.util.PSQLException: Unable to convert bytea parameter at position 1 to literal. (Closes: #1098830)
parent 1351f07f
No related branches found
Tags debian/42.7.5-2
No related merge requests found
Pipeline #852336 passed
libpgjava (42.7.5-2) unstable; urgency=medium
* Fix org.postgresql.util.PSQLException: Unable to convert bytea parameter
at position 1 to literal. (Closes: #1098830)
-- Christoph Berg <myon@debian.org> Thu, 17 Apr 2025 11:14:38 +0000
libpgjava (42.7.5-1) unstable; urgency=medium
* Team upload.
......
02-scram-optional.patch
tostring
Fix org.postgresql.util.PSQLException: Unable to convert bytea parameter at position 1 to literal
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1098830
https://github.com/pgjdbc/pgjdbc/issues/3365
--- a/src/main/java/org/postgresql/core/v3/SimpleParameterList.java
+++ b/src/main/java/org/postgresql/core/v3/SimpleParameterList.java
@@ -250,21 +250,7 @@ class SimpleParameterList implements V3P
String textValue;
String type;
if (paramTypes[index] == Oid.BYTEA) {
- try {
- return PGbytea.toPGLiteral(paramValue);
- } catch (Throwable e) {
- Throwable cause = e;
- if (!(cause instanceof IOException)) {
- // This is for compatibilty with the similar handling in QueryExecutorImpl
- cause = new IOException("Error writing bytes to stream", e);
- }
- throw sneakyThrow(
- new PSQLException(
- GT.tr("Unable to convert bytea parameter at position {0} to literal",
- index),
- PSQLState.INVALID_PARAMETER_VALUE,
- cause));
- }
+ return "?";
}
if ((flags[index] & BINARY) == BINARY) {
// handle some of the numeric types
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment