We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 764be81 commit fe83376Copy full SHA for fe83376
1 file changed
datafusion-postgres/src/handlers.rs
@@ -405,14 +405,18 @@ impl QueryParser for Parser {
405
column_format: Option<&Format>,
406
) -> PgWireResult<Vec<FieldInfo>> {
407
if let (_, Some((_, plan))) = stmt {
408
- let schema = plan.schema();
409
- let fields = arrow_schema_to_pg_fields(
410
- schema.as_arrow(),
411
- column_format.unwrap_or(&Format::UnifiedText),
412
- None,
413
- )?;
414
-
415
- Ok(fields)
+ if !matches!(plan, LogicalPlan::Ddl(_) | LogicalPlan::Dml(_)) {
+ let schema = plan.schema();
+ let fields = arrow_schema_to_pg_fields(
+ schema.as_arrow(),
+ column_format.unwrap_or(&Format::UnifiedText),
+ None,
+ )?;
+
416
+ Ok(fields)
417
+ } else {
418
+ Ok(vec![])
419
+ }
420
} else {
421
Ok(vec![])
422
}
0 commit comments