FINALLY got postgresql to play nicely