You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The code provided in the reproduction steps fails to compile with:
error[E0308]: mismatched types
--> src/main.rs:44:17
|
44 | "#, &[1, 2, 3], &[Some(true), Some(false), None]).fetch_all(db).await;
| ^
| |
| expected `&[bool]`, found `&[Option<bool>; 3]`
| expected due to the type of this binding
|
= note: expected reference `&[bool]`
found reference `&[std::option::Option<bool>; 3]`
Reproduction steps
let r = sqlx::query!(r#"SELECT * FROM unnest( $1::bigint[], $2::bool[] ) AS t( user_id, admin)"#,&[1,2,3],&[Some(true),Some(false),None]).fetch_all(db).await;
SQLx version
0.8.3
Enabled SQLx features
["postgres", "runtime-tokio-rustls"]
Database server and version
postgres (PostgreSQL) 16.6
Operating system
Linux nixos-pc 6.12.16 #1-NixOS SMP PREEMPT_DYNAMIC Fri Feb 21 13:01:47 UTC 2025 x86_64 GNU/Linux
Rust version
rustc 1.85.0 (4d91de4e4 2025-02-17)
The text was updated successfully, but these errors were encountered:
C0D3-M4513R
changed the title
PostgreSQL querys doesn't support arrays containing nullable items
PostgreSQL querys don't support arrays containing nullable items
Mar 9, 2025
I have found these related issues/pull requests
I didn't find any
Description
The code provided in the reproduction steps fails to compile with:
Reproduction steps
SQLx version
0.8.3
Enabled SQLx features
["postgres", "runtime-tokio-rustls"]
Database server and version
postgres (PostgreSQL) 16.6
Operating system
Linux nixos-pc 6.12.16 #1-NixOS SMP PREEMPT_DYNAMIC Fri Feb 21 13:01:47 UTC 2025 x86_64 GNU/Linux
Rust version
rustc 1.85.0 (4d91de4e4 2025-02-17)
The text was updated successfully, but these errors were encountered: