@@ -519,7 +519,7 @@ test_type!(numrange_bigdecimal<PgRange<sqlx::types::BigDecimal>>(Postgres,
519519 Bound :: Excluded ( "2.4" . parse:: <sqlx:: types:: BigDecimal >( ) . unwrap( ) ) ) )
520520) ) ;
521521
522- #[ cfg( any ( postgres_14 , postgres_15 ) ) ]
522+ #[ cfg( not ( postgres = "13" ) ) ]
523523test_type ! ( cube<sqlx:: postgres:: types:: PgCube >( Postgres ,
524524 "cube(2)" == sqlx:: postgres:: types:: PgCube :: Point ( 2. ) ,
525525 "cube(2.1)" == sqlx:: postgres:: types:: PgCube :: Point ( 2.1 ) ,
@@ -530,51 +530,43 @@ test_type!(cube<sqlx::postgres::types::PgCube>(Postgres,
530530 "cube(array[2,3,4],array[4,5,6])" == sqlx:: postgres:: types:: PgCube :: MultiDimension ( vec![ vec![ 2. , 3. , 4. ] , vec![ 4. , 5. , 6. ] ] ) ,
531531) ) ;
532532
533- #[ cfg( any ( postgres_14 , postgres_15 ) ) ]
533+ #[ cfg( not ( postgres = "13" ) ) ]
534534test_type ! ( _cube<Vec <sqlx:: postgres:: types:: PgCube >>( Postgres ,
535535 "array[cube(2),cube(2)]" == vec![ sqlx:: postgres:: types:: PgCube :: Point ( 2. ) , sqlx:: postgres:: types:: PgCube :: Point ( 2. ) ] ,
536536 "array[cube(2.2,-3.4)]" == vec![ sqlx:: postgres:: types:: PgCube :: OneDimensionInterval ( 2.2 , -3.4 ) ] ,
537537) ) ;
538538
539- #[ cfg( any( postgres_12, postgres_13, postgres_14, postgres_15) ) ]
540539test_type ! ( point<sqlx:: postgres:: types:: PgPoint >( Postgres ,
541540 "point(2.2,-3.4)" ~= sqlx:: postgres:: types:: PgPoint { x: 2.2 , y: -3.4 } ,
542541) ) ;
543542
544- #[ cfg( any( postgres_12, postgres_13, postgres_14, postgres_15) ) ]
545543test_type ! ( _point<Vec <sqlx:: postgres:: types:: PgPoint >>( Postgres ,
546544 "array[point(2,3),point(2.1,3.4)]" @= vec![ sqlx:: postgres:: types:: PgPoint { x: 2. , y: 3. } , sqlx:: postgres:: types:: PgPoint { x: 2.1 , y: 3.4 } ] ,
547545 "array[point(2.2,-3.4)]" @= vec![ sqlx:: postgres:: types:: PgPoint { x: 2.2 , y: -3.4 } ] ,
548546) ) ;
549547
550- #[ cfg( any( postgres_12, postgres_13, postgres_14, postgres_15) ) ]
551548test_type ! ( line<sqlx:: postgres:: types:: PgLine >( Postgres ,
552549 "line('{1.1, -2.2, 3.3}')" == sqlx:: postgres:: types:: PgLine { a: 1.1 , b: -2.2 , c: 3.3 } ,
553550 "line('((0.0, 0.0), (1.0,1.0))')" == sqlx:: postgres:: types:: PgLine { a: 1. , b: -1. , c: 0. } ,
554551) ) ;
555552
556- #[ cfg( any( postgres_12, postgres_13, postgres_14, postgres_15) ) ]
557553test_type ! ( lseg<sqlx:: postgres:: types:: PgLSeg >( Postgres ,
558554 "lseg('((1.0, 2.0), (3.0,4.0))')" == sqlx:: postgres:: types:: PgLSeg { start_x: 1. , start_y: 2. , end_x: 3. , end_y: 4. } ,
559555) ) ;
560556
561- #[ cfg( any( postgres_12, postgres_13, postgres_14, postgres_15) ) ]
562557test_type ! ( box<sqlx:: postgres:: types:: PgBox >( Postgres ,
563558 "box('((1.0, 2.0), (3.0,4.0))')" == sqlx:: postgres:: types:: PgBox { upper_right_x: 3. , upper_right_y: 4. , lower_left_x: 1. , lower_left_y: 2. } ,
564559) ) ;
565560
566- #[ cfg( any( postgres_12, postgres_13, postgres_14, postgres_15) ) ]
567561test_type ! ( _box<Vec <sqlx:: postgres:: types:: PgBox >>( Postgres ,
568562 "array[box('1,2,3,4'),box('((1.1, 2.2), (3.3, 4.4))')]" @= vec![ sqlx:: postgres:: types:: PgBox { upper_right_x: 3. , upper_right_y: 4. , lower_left_x: 1. , lower_left_y: 2. } , sqlx:: postgres:: types:: PgBox { upper_right_x: 3.3 , upper_right_y: 4.4 , lower_left_x: 1.1 , lower_left_y: 2.2 } ] ,
569563) ) ;
570564
571- #[ cfg( any( postgres_12, postgres_13, postgres_14, postgres_15) ) ]
572565test_type ! ( path<sqlx:: postgres:: types:: PgPath >( Postgres ,
573566 "path('((1.0, 2.0), (3.0,4.0))')" == sqlx:: postgres:: types:: PgPath { closed: true , points: vec![ sqlx:: postgres:: types:: PgPoint { x: 1. , y: 2. } , sqlx:: postgres:: types:: PgPoint { x: 3. , y: 4. } ] } ,
574567 "path('[(1.0, 2.0), (3.0,4.0)]')" == sqlx:: postgres:: types:: PgPath { closed: false , points: vec![ sqlx:: postgres:: types:: PgPoint { x: 1. , y: 2. } , sqlx:: postgres:: types:: PgPoint { x: 3. , y: 4. } ] } ,
575568) ) ;
576569
577- #[ cfg( any( postgres_12, postgres_13, postgres_14, postgres_15) ) ]
578570test_type ! ( polygon<sqlx:: postgres:: types:: PgPolygon >( Postgres ,
579571 "polygon('((-2,-3),(-1,-3),(-1,-1),(1,1),(1,3),(2,3),(2,-3),(1,-3),(1,0),(-1,0),(-1,-2),(-2,-2))')" ~= sqlx:: postgres:: types:: PgPolygon { points: vec![
580572 sqlx:: postgres:: types:: PgPoint { x: -2. , y: -3. } , sqlx:: postgres:: types:: PgPoint { x: -1. , y: -3. } , sqlx:: postgres:: types:: PgPoint { x: -1. , y: -1. } , sqlx:: postgres:: types:: PgPoint { x: 1. , y: 1. } ,
@@ -583,7 +575,6 @@ test_type!(polygon<sqlx::postgres::types::PgPolygon>(Postgres,
583575 ] } ,
584576) ) ;
585577
586- #[ cfg( any( postgres_12, postgres_13, postgres_14, postgres_15) ) ]
587578test_type ! ( circle<sqlx:: postgres:: types:: PgCircle >( Postgres ,
588579 "circle('<(1.1, -2.2), 3.3>')" ~= sqlx:: postgres:: types:: PgCircle { x: 1.1 , y: -2.2 , radius: 3.3 } ,
589580 "circle('((1.1, -2.2), 3.3)')" ~= sqlx:: postgres:: types:: PgCircle { x: 1.1 , y: -2.2 , radius: 3.3 } ,
@@ -678,17 +669,11 @@ test_prepared_type!(citext_array<Vec<PgCiText>>(Postgres,
678669 ] ,
679670) ) ;
680671
681- // FIXME: needed to disable `ltree` tests in version that don't have a binary format for it
682- // but `PgLTree` should just fall back to text format
683- #[ cfg( any( postgres_14, postgres_15) ) ]
684672test_type ! ( ltree<sqlx:: postgres:: types:: PgLTree >( Postgres ,
685673 "'Foo.Bar.Baz.Quux'::ltree" == sqlx:: postgres:: types:: PgLTree :: from_str( "Foo.Bar.Baz.Quux" ) . unwrap( ) ,
686674 "'Alpha.Beta.Delta.Gamma'::ltree" == sqlx:: postgres:: types:: PgLTree :: try_from_iter( [ "Alpha" , "Beta" , "Delta" , "Gamma" ] ) . unwrap( ) ,
687675) ) ;
688676
689- // FIXME: needed to disable `ltree` tests in version that don't have a binary format for it
690- // but `PgLTree` should just fall back to text format
691- #[ cfg( any( postgres_14, postgres_15) ) ]
692677test_type ! ( ltree_vec<Vec <sqlx:: postgres:: types:: PgLTree >>( Postgres ,
693678 "array['Foo.Bar.Baz.Quux', 'Alpha.Beta.Delta.Gamma']::ltree[]" ==
694679 vec![
0 commit comments