pgrx icon indicating copy to clipboard operation
pgrx copied to clipboard

return u32 error

Open FreeGIS opened this issue 1 year ago • 2 comments

#[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

FreeGIS avatar May 08 '24 04:05 FreeGIS

This one has bitten me more than once. Must use i32.

ccleve avatar Jun 30 '24 02:06 ccleve

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

t3hmrman avatar Jul 02 '24 04:07 t3hmrman