Skip to content

Commit a579479

Browse files
committed
Fix unsupported parameter type handling - graceful degradation instead of FATAL errors
✅ **Issue: FATAL errors for unsupported parameter types** - Replace FATAL error with graceful degradation to TEXT type - Allow DBeaver and other clients to work with unsupported PostgreSQL parameter types - Prevents connection drops when clients use advanced parameter types - Matches the pattern we used for unknown parameter types in extended queries This fixes issues where clients like DBeaver would encounter: 'FATAL: Unsupported parameter type: <some_type>' Instead, unsupported types now gracefully fall back to TEXT, allowing the query to proceed.
1 parent 1f984b0 commit a579479

File tree

1 file changed

+5
-6
lines changed
  • arrow-pg/src/datatypes

1 file changed

+5
-6
lines changed

arrow-pg/src/datatypes/df.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use futures::{stream, StreamExt};
1111
use pgwire::api::portal::{Format, Portal};
1212
use pgwire::api::results::QueryResponse;
1313
use pgwire::api::Type;
14-
use pgwire::error::{ErrorInfo, PgWireError, PgWireResult};
14+
use pgwire::error::{PgWireError, PgWireResult};
1515
use pgwire::messages::data::DataRow;
1616
use rust_decimal::prelude::ToPrimitive;
1717
use rust_decimal::Decimal;
@@ -262,11 +262,10 @@ where
262262
}
263263
// TODO: add more advanced types (composite types, ranges, etc.)
264264
_ => {
265-
return Err(PgWireError::UserError(Box::new(ErrorInfo::new(
266-
"FATAL".to_string(),
267-
"XX000".to_string(),
268-
format!("Unsupported parameter type: {pg_type}"),
269-
))));
265+
// Default to string/text for unsupported parameter types
266+
// This allows graceful degradation instead of fatal errors
267+
let value = portal.parameter::<String>(i, &pg_type)?;
268+
deserialized_params.push(ScalarValue::Utf8(value));
270269
}
271270
}
272271
}

0 commit comments

Comments
 (0)