pgrx
pgrx copied to clipboard
Allow returning values from a transaction in a bgworker
In some scenarios, it'd be beneficial to be able to return a result from a successfully executed transactio.
To allow this, BackgroundWorker::transaction has been extended to return a return value from the provided function. It's backwards compatible, as previously these functions were required to return the unit, and it transaction returned unit as well.