Hacker News new | ask | show | jobs
by chc 2162 days 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.
1 comments

Fair. 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.