diff --git a/sqlx-core/src/postgres/connection/describe.rs b/sqlx-core/src/postgres/connection/describe.rs index 0ff771a6..dda7ada4 100644 --- a/sqlx-core/src/postgres/connection/describe.rs +++ b/sqlx-core/src/postgres/connection/describe.rs @@ -466,10 +466,8 @@ fn visit_plan(plan: &Plan, outputs: &[String], nullables: &mut Vec> if let Some(plan_outputs) = &plan.output { // all outputs of a Full Join must be marked nullable // otherwise, all outputs of the inner half of an outer join must be marked nullable - if let Some("Full") | Some("Inner") = plan - .join_type - .as_deref() - .or(plan.parent_relation.as_deref()) + if plan.join_type.as_deref() == Some("Full") + || plan.parent_relation.as_deref() == Some("Inner") { for output in plan_outputs { if let Some(i) = outputs.iter().position(|o| o == output) { diff --git a/tests/postgres/postgres.rs b/tests/postgres/postgres.rs index 2270e387..4c884b17 100644 --- a/tests/postgres/postgres.rs +++ b/tests/postgres/postgres.rs @@ -841,8 +841,8 @@ async fn test_describe_outer_join_nullable() -> anyhow::Result<()> { let describe = conn .describe( "select tweet.id -from (values (null)) vals(val) - inner join tweet on false", + from tweet + inner join products on products.name = tweet.text", ) .await?;