other example related to using psql in pipeline
[pavel@localhost psql]$ ./psql postgres -q -g "vacuum analyze pg_attribute" -g "\echo :DBNAME" postgres
other example related to using psql in pipeline
[pavel@localhost psql]$ ./psql postgres -q -g "vacuum analyze pg_attribute" -g "\echo :DBNAME" postgres