oracle - Passing argument from psql command invoked from batch or shell to a .sql file postgres -
scenerio
i calling .sql file runtest.sql , seeting variable through -v command
psql.exe -w -f d:\testfolder1\runtest.sql -v v1='test' -o d:\testfolder1\test1.txt
content of runtest.sql
select :v1 \copy ( select 2+3 )to c:\:v1.txt;
the first command working per expectation v1 printed test
but second command od copy giving error :v1 not defined . want make file run time parameteres passed
Comments
Post a Comment