snipt

Ctrl+h for KB shortcuts

Bash

Output PostgreSQL command as CSV

psql -F\; -A --pset footer -f input_file.sql -o output_file.csv database_name
https://snipt.net/embed/73e4d7ff8cf84e68e2485ca81586ee45/
/raw/73e4d7ff8cf84e68e2485ca81586ee45/
73e4d7ff8cf84e68e2485ca81586ee45
bash
Bash
1
2019-05-26T02:49:03
True
False
False
/api/public/snipt/9837/
output-postgresql-command-as-csv
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>psql -F<span class="se">\;</span> -A --pset footer -f input_file.sql -o output_file.csv database_name </span></pre></div> </td></tr></table>
csv, postgresql, psql