@@ -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( all ( postgres , 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,51 @@ 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( all ( postgres , 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 ) ) ]
539+ #[ cfg( postgres ) ]
540540test_type ! ( point<sqlx:: postgres:: types:: PgPoint >( Postgres ,
541541 "point(2.2,-3.4)" ~= sqlx:: postgres:: types:: PgPoint { x: 2.2 , y: -3.4 } ,
542542) ) ;
543543
544- #[ cfg( any ( postgres_12 , postgres_13 , postgres_14 , postgres_15 ) ) ]
544+ #[ cfg( postgres ) ]
545545test_type ! ( _point<Vec <sqlx:: postgres:: types:: PgPoint >>( Postgres ,
546546 "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 } ] ,
547547 "array[point(2.2,-3.4)]" @= vec![ sqlx:: postgres:: types:: PgPoint { x: 2.2 , y: -3.4 } ] ,
548548) ) ;
549549
550- #[ cfg( any ( postgres_12 , postgres_13 , postgres_14 , postgres_15 ) ) ]
550+ #[ cfg( postgres ) ]
551551test_type ! ( line<sqlx:: postgres:: types:: PgLine >( Postgres ,
552552 "line('{1.1, -2.2, 3.3}')" == sqlx:: postgres:: types:: PgLine { a: 1.1 , b: -2.2 , c: 3.3 } ,
553553 "line('((0.0, 0.0), (1.0,1.0))')" == sqlx:: postgres:: types:: PgLine { a: 1. , b: -1. , c: 0. } ,
554554) ) ;
555555
556- #[ cfg( any ( postgres_12 , postgres_13 , postgres_14 , postgres_15 ) ) ]
556+ #[ cfg( postgres ) ]
557557test_type ! ( lseg<sqlx:: postgres:: types:: PgLSeg >( Postgres ,
558558 "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. } ,
559559) ) ;
560560
561- #[ cfg( any ( postgres_12 , postgres_13 , postgres_14 , postgres_15 ) ) ]
561+ #[ cfg( postgres ) ]
562562test_type ! ( box<sqlx:: postgres:: types:: PgBox >( Postgres ,
563563 "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. } ,
564564) ) ;
565565
566- #[ cfg( any ( postgres_12 , postgres_13 , postgres_14 , postgres_15 ) ) ]
566+ #[ cfg( postgres ) ]
567567test_type ! ( _box<Vec <sqlx:: postgres:: types:: PgBox >>( Postgres ,
568568 "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 } ] ,
569569) ) ;
570570
571- #[ cfg( any ( postgres_12 , postgres_13 , postgres_14 , postgres_15 ) ) ]
571+ #[ cfg( postgres ) ]
572572test_type ! ( path<sqlx:: postgres:: types:: PgPath >( Postgres ,
573573 "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. } ] } ,
574574 "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. } ] } ,
575575) ) ;
576576
577- #[ cfg( any ( postgres_12 , postgres_13 , postgres_14 , postgres_15 ) ) ]
577+ #[ cfg( postgres ) ]
578578test_type ! ( polygon<sqlx:: postgres:: types:: PgPolygon >( Postgres ,
579579 "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![
580580 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 +583,7 @@ test_type!(polygon<sqlx::postgres::types::PgPolygon>(Postgres,
583583 ] } ,
584584) ) ;
585585
586- #[ cfg( any ( postgres_12 , postgres_13 , postgres_14 , postgres_15 ) ) ]
586+ #[ cfg( postgres ) ]
587587test_type ! ( circle<sqlx:: postgres:: types:: PgCircle >( Postgres ,
588588 "circle('<(1.1, -2.2), 3.3>')" ~= sqlx:: postgres:: types:: PgCircle { x: 1.1 , y: -2.2 , radius: 3.3 } ,
589589 "circle('((1.1, -2.2), 3.3)')" ~= sqlx:: postgres:: types:: PgCircle { x: 1.1 , y: -2.2 , radius: 3.3 } ,
@@ -678,17 +678,13 @@ test_prepared_type!(citext_array<Vec<PgCiText>>(Postgres,
678678 ] ,
679679) ) ;
680680
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) ) ]
681+ #[ cfg( postgres) ]
684682test_type ! ( ltree<sqlx:: postgres:: types:: PgLTree >( Postgres ,
685683 "'Foo.Bar.Baz.Quux'::ltree" == sqlx:: postgres:: types:: PgLTree :: from_str( "Foo.Bar.Baz.Quux" ) . unwrap( ) ,
686684 "'Alpha.Beta.Delta.Gamma'::ltree" == sqlx:: postgres:: types:: PgLTree :: try_from_iter( [ "Alpha" , "Beta" , "Delta" , "Gamma" ] ) . unwrap( ) ,
687685) ) ;
688686
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) ) ]
687+ #[ cfg( postgres) ]
692688test_type ! ( ltree_vec<Vec <sqlx:: postgres:: types:: PgLTree >>( Postgres ,
693689 "array['Foo.Bar.Baz.Quux', 'Alpha.Beta.Delta.Gamma']::ltree[]" ==
694690 vec![
0 commit comments