Created
December 17, 2015 19:10
-
-
Save ismyrnow/faada0a84f30d4c66dc1 to your computer and use it in GitHub Desktop.
Query multiple postgres databases, outputting results as CSV
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
for %%a in (DB1,DB2,DB3) do call psql -h DBHOST -c "SQL" -t -A -F , %%a DBUSER |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment