pgcentralfoundation / pgrx

Build Postgres Extensions with Rust!
Other
3.42k stars 223 forks source link

Use a ThinCStr type #1730

Open workingjubilee opened 1 month ago

workingjubilee commented 1 month ago

Relatively simple.

Pick or write a ThinCStr type (or Thin<CStr>, whatever). and rewrite most/all *const c_char args in pgrx-pg-sys bindings to take it. In practice they generally want to be pointers to null terminated strings.

workingjubilee commented 1 month ago

more ambitious: get upstream to finally implement size_of::<&CStr>() == size_of::<*const c_char>() like they have been threatening to do Forever.