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

Popular posts from this blog

java - Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved -

Round ImageView Android -

How can I utilize Yahoo Weather API in android -