node-pg-large-object
node-pg-large-object copied to clipboard
Callback examples fail to close the transaction
Every transaction must terminate with either COMMIT
or ROLLBACK.
Failure to do so leaves the transaction open. And since you always rely on the connection pool, you will end up executing unrelated queries inside your transaction context.
When using pg-promise
, the ROLLBACK
is executed automatically when the transaction errors, but all of the callback examples provided here do not do that, and need to be corrected.