Fixed postgresql dump

Fixed postgresql dump (sorry about this being entangled with the other pull request).