Yes getting the data to an rpc call could be messy/confusing. There is no way (that I know of ) for postgres to do multiple updates in a single call, so not much the api can do to fix that. If you are leaning the rpc route probably formatting a json structure with table objects and their data, then "looping" thru that is cleanest on passing the data, but means you have to learn to handle json on the postgres side.
I've not hit any of this yet though, so just do my pairs of updates in the js code and deal with the 2nd breaking if the first succeeded myself.
Maybe one of the more seasoned postgres users will jump in with the "best" way to deal with this.