title: Using an environment variable in a PSQL script
body: <p>Is it possible to use a Linux environment variable inside a .sql file? I'm using the copy/select query to write to an output file, and I'll like to put that directory in a variable. So I want to do something like:</p>
  
  <pre><code>COPY (SELECT * FROM a)
  TO $outputdir/a.csv
  </code></pre>
  
  <p>Outputdir would be set in my environment. Is this possible?</p>