@johto this is what I found as well. I think mirroring libpq functionality is best.