From 8a44f3545a30a5213fde14c3bb2e163ea8995015 Mon Sep 17 00:00:00 2001 From: Jakub Labor Date: Mon, 16 Dec 2024 12:21:57 -0500 Subject: [PATCH] Dont use `EXPLAIN` in nullability check for QuestDB --- sqlx-postgres/src/connection/describe.rs | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/sqlx-postgres/src/connection/describe.rs b/sqlx-postgres/src/connection/describe.rs index 9303e602e5..650ccbd67c 100644 --- a/sqlx-postgres/src/connection/describe.rs +++ b/sqlx-postgres/src/connection/describe.rs @@ -486,18 +486,12 @@ WHERE rngtypid = $1 ) })?; - // If the server is CockroachDB or Materialize, skip this step (#1248). - if !self - .inner - .stream - .parameter_statuses - .contains_key("crdb_version") - && !self - .inner - .stream - .parameter_statuses - .contains_key("mz_version") - { + // If the server doesn't support EXPLAIN statements, skip this step (#1248). + let parameter_statuses = &self.inner.stream.parameter_statuses; + let is_cockroachdb = parameter_statuses.contains_key("crdb_version"); + let is_materialize = parameter_statuses.contains_key("mz_version"); + let is_questdb = parameter_statuses.contains_key("questdb_version"); + if !is_cockroachdb && !is_materialize && !is_questdb { // patch up our null inference with data from EXPLAIN let nullable_patch = self .nullables_from_explain(stmt_id, meta.parameters.len())