From fe99e4884c0b8def07565b870d730830d60b944a Mon Sep 17 00:00:00 2001 From: James Holman Date: Wed, 6 Nov 2024 19:04:32 +1100 Subject: [PATCH] fix: one more geometry match tests --- sqlx-test/src/lib.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/sqlx-test/src/lib.rs b/sqlx-test/src/lib.rs index da97fc03d0..5934cf4814 100644 --- a/sqlx-test/src/lib.rs +++ b/sqlx-test/src/lib.rs @@ -247,10 +247,8 @@ macro_rules! Postgres_query_for_test_prepared_geometric_type { #[macro_export] macro_rules! Postgres_query_for_test_prepared_geometric_array_type { () => { - "SELECT ( - SELECT bool_and(geo1 ~= geo2) - FROM unnest({0}) as geo1, - unnest($1) as geo2 - )::int4, {0}, $2" + "SELECT bool_and(geo1.geometry ~= geo2.geometry)::int4 + FROM unnest({0}) WITH ORDINALITY AS geo1(geometry, idx) + JOIN unnest($1) WITH ORDINALITY AS geo2(geometry, idx) ON geo1.idx = geo2.idx;" }; }