3 ms·
Does Rust give you compile-time guarantees around not crashing? I thought any function could panic without so much as a peep from the compiler.
by chc 6y ago
Does Rust give you compile-time guarantees around not crashing? I thought any function could panic without so much as a peep from the compiler.
- zombodb 6y agoFair. With pgx, however, Rust "panic!"s are translated into standard Postgres "ERROR"s, such that instead of crashing, only the current transaction aborts. So while you're pretty much correct in general, pgx handles it in the way a PG extension author would expect.