Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

psql client write to bash variable

vartest=`psql -X -A -d $dbname -U $username -h localhost -p 5432 -t -c "SELECT gid FROM testtable WHERE aid='1'"`
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #psql #client #write #bash #variable
ADD COMMENT
Topic
Name
1+5 =