title: Postgres: Create role in one line
body: <p>I want to create a role/user in one line. Here's what I tried:</p>
  
  <pre><code>psql -U postgres -c 'createuser my_app with createdb login password 'my_password';'
  psql: warning: extra command-line argument "with" ignored
  psql: warning: extra command-line argument "createdb" ignored
  psql: warning: extra command-line argument "login" ignored
  psql: warning: extra command-line argument "password" ignored
  psql: warning: extra command-line argument "'my_password';'" ignored
  psql: FATAL:  database "my_app" does not exist
  </code></pre>
  
  <p>In place of <code>createuser</code> I have also tried <code>create user</code> and <code>create role</code>, but regardless, I get the same error. I'm on <em>Windows</em> with <em>(PostgreSQL) 9.6.2</em></p>
  
  <p>What am I doing wrong?</p>
  
  <hr>
  
  <p>Update:</p>
  
  <p>I tried using double quotes, but for some reason, postgres doesn't seem to like my double quotes. Using double quotes inside of single quotes mysteriously works -> Thanks @Laurenz</p>
  
  <pre><code>psql -U postgres -c "createuser my_app with createdb login password 'my_password';"
  ERROR:  syntax error at or near "createuser"
  LINE 1: createuser my_app with createdb login password 'my_password'...
  </code></pre>