From 1cbd7e4078cdd324b1236bfd92c8151197ba266a Mon Sep 17 00:00:00 2001 From: James Holman Date: Wed, 21 Aug 2024 21:05:18 +1000 Subject: [PATCH] fix: array compatible geometric comparison --- sqlx-test/src/lib.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sqlx-test/src/lib.rs b/sqlx-test/src/lib.rs index 8cbecbeac1..c73251d954 100644 --- a/sqlx-test/src/lib.rs +++ b/sqlx-test/src/lib.rs @@ -234,7 +234,6 @@ macro_rules! Postgres_query_for_test_prepared_type { #[macro_export] macro_rules! Postgres_query_for_test_prepared_geometric_type { () => { - "SELECT ({0} @= $1)::int4, {0}, $2 -" + "SELECT (CASE WHEN pg_typeof({0})::text LIKE '%[]' THEN (array_to_string({0}, '') = array_to_string($1, ''))::int4 ELSE ({0} @= $1)::int4 END), {0}, $2" }; }