title: How to run in-line SQL script in the command line?
body: <p>I have trouble to execute a SQL script via command line, this is what I have</p>
  
  <pre><code>"C:\..\psql.exe" -h my_server_host -U username -c 'CREATE DATABASE test;'
  </code></pre>
  
  <p>I got this error:</p>
  
  <pre><code>psql: warning: extra command-line argument "test;'" ignored
  psql: FATAL:  database "DATABASE" does not exist
  </code></pre>
  
  <p>I am on Windows 7 with Postgresql 9.3.</p>
  
  <p>Any idea how to do that?</p>