sfackler / rust-postgres

Native PostgreSQL driver for the Rust programming language
Apache License 2.0
3.5k stars 443 forks source link

feat: support [u8; N] as BYTEA #915

Closed xoac closed 2 years ago

xoac commented 2 years ago

There is a implementation for &[u8] but lacking implementation of [u8; N] what this PR is try to add. Waiting for feedback

sfackler commented 2 years ago

This already exists under the array-impls Cargo feature.

xoac commented 2 years ago

Could you show me where? There is general implementation for [T; N] but I don't see it could map to [u8; N].

Also if this would be implemented my PR should not compile. Also my LSP provide to_sql method for [0u32, 0] but not for [0u8, 0]

sfackler commented 2 years ago

Oh sorry - I misread!

sfackler commented 2 years ago

Could you update the ToSql docs as well? LGTM otherwise.

xoac commented 2 years ago

Please check if document updates are correct

sfackler commented 2 years ago

Thanks!