Hi David,
1) I thought that --set command is meant at DB level for all the commands being run. So ran it first. Not sure how to use it within the command.
2) -c option: I was doing something but forgot to remove it and didn't notice that it is still there. Now, if I run it with -c option, then also I am facing the same issue.
3) I realize that the psql.log is different from java log. Reason for creating this log is to read the error message from the file since command exists successfully and not with some errors. %errorlevel% is 0 even if the command fails, therefore my java does not stop. So i use this log file to read if there is any error record else continue.
Now, I am facing one more issue: The creation of the log file command sometimes creates a log file and sometimes doesn't ( through java). Wanted to check if there is something I should keep in mind for this.? Command I am running is:
"<path_to_exe>psql.exe" -U <value>-w -h <value>-d <value> -a -f "<path to .sql file>copy_s_m_asset_391.sql" 2> ",log_file_path>psql.log"
Thanks a lot for you help on this. Really appreciate it.
Aman