Advertisement
Guest User

Untitled

a guest
Apr 25th, 2016
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. @echo off
  2. chcp 1252
  3. :: Database password needs to be set globally
  4. set PGPASSWORD=<YOUR-PASSWORD>
  5. SETLOCAL
  6. set USER=postgres
  7. set HOST=localhost
  8. set DBNAME=my-database
  9. :: Invoking postgres assuming that PSQL is on system path
  10. psql -h %HOST% -U %USER% %DBNAME%
  11. ENDLOCAL
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement