At the moment, the eventually-postgres implementation uses a stored procedure to aid in the event::Store::append and aggregate::Repository::save methods.
Instead, we could mimick the functionality of go-eventually where we use an isolated, serializable transaction to perform the update, which removes the need for stored procedures:
https://github.com/get-eventually/go-eventually/blob/c6b8740b1c0b55c25ee2132e2c7f244880f165b4/postgres/event_store.go#L92-L96