Closed conradludgate closed 3 days ago
I appreciate this PR. Thanks!
so to leave an approval with a clear conscience I'll just mention few refs that back up this implementation (also having in mind concern about "ereport and panic" in #6):
ereport!
for ERROR level will eventually panic anyway so these changes don't alter the existing runtime behavior
pgrx
, as per https://github.com/eeeebbbbrrrr/pgrx/blob/master/DESIGN-DECISIONS.md#protecting-the-rust-stack-read-lying-to-postgres
After Rust's stack has unwound, the panic!() is handed off to ereport(), passing final error handling control back to Postgres.
panic! is already being turned into error level reports, but with a generic error code. This makes it explicit.