pgrx
pgrx copied to clipboard
return u32 error
#[pg_extern] fn get_u32() -> u32 { let a: u32 = 2; a }
Error: 0: Could not write SQL to /home/postgres/pg16/share/extension/postgrid--0.0.0.sql 1: Got non-plain mapped/composite return variant SQL in what macro-expansion thought was a type, got: One(Source { array_brackets: false })
Location: /root/.cargo/registry/src/rsproxy.cn-8f6827c7555bfaf8/pgrx-sql-entity-graph-0.11.4/src/pg_extern/entity/mod.rs:273
This one has bitten me more than once. Must use i32.
Maybe it makes sense to add some checking for this to pg_extern itself? That might save people who run into this in the future