Fix last insert ID not being returned with postgresql, take 2.