Line breaks in psql query file possible?
<p>I'm running a bash file to handle some psql tasks. However, I'd like the text file containing the query (fp_query.txt) to accept line breaks for enhanced readability. Currently, I'm getting this error:</p>

<pre><code>parse error at end of line
</code></pre>

<p>when I maintain line breaks. Is there some way to have the interpreter ignore line breaks so that I can keep them in the query file?</p>

<p>For reference, here's the .sh file:</p>

<pre><code>export PGPASSFILE=.pgpass
psql -h [hostname] -d [dbname] -U [user] -f fp_query.txt
</code></pre>

<p>And here's fp_query.txt:</p>

<pre><code>\copy (SELECT created_at::date, COUNT(*)
    FROM ela_snapshots 
    WHERE created_at::date &gt; CURRENT_DATE - 30 
    GROUP BY 1) to 'ELA_comp_tot_daily_sess.csv' with CSV HEADER
</code></pre>