Archive: How to direct query results to outer file in PostgreSQL ?


How to direct query results to outer file in PostgreSQL ?
Hello,
I am using psql to create database and import dump file, but I can't direct the query results to out file. When I execute
this command:
psql.exe -U postgres BLAH -f "D:\mydb.dmp" \o D:\log.log
in command prompt it always says there is "extra command-line argument". I reordered arguments in many ways, but it is the same.
Please, help me, can i use ExecWait (ExecDos,ExecCmd) here, or there is other way?


If psql says "extra command-line argument", this looks like it's command line parsing message, not NSIS compiller, and NSIS plug-ins can not help here. Try to run this command line out of NSIS installer (in the DOS window) first.
Additionally:
IO redirection with ExecWait and COMSPEC http://forums.winamp.com/showthread....hlight=COMSPEC , but this way not hides console window. On Win9x ExecWait also may return wrong exit code.
ExecDos had problem with MySQL utilities, so you need to test it psql, but batch files help sometimes.
ExecCmd is stands very close to ExecWait, but it hides console and can send string to process stdin (via WM_CHAR). But on Win9x you have the same problems as with NSIS ExecWait.