adds zsh function to terminate pg connections