suggestion for a small performance improvement: replace StringBuffer with StringBuilder when the StringBuffer is used as a local variable in a method.
I just browsed the git-repo (https://github.com/pgjdbc/pgjdbc/tree/master/org/postgresql) looking for prepared statement caching (which I could not find, but that is for another day) and saw a lot of places where StringBuffer can be replaced by StringBuilder.
indicates that if StringBuffer is used a lot, replacing it with StringBuilder can make a difference. And I can not think of a reason to use a StringBuffer if it is just used locally in a method to build a String.