title: Create Postgres database using batch file with [template],[encoding],[owner] and a .sql file
body: <p>I want to create a Postgres database using a batch file.  Now the normal way of doing this is the following:</p>
  
  <p>"C:\Program Files\PostgreSQL\9.0\bin\createdb.exe" -U Myadmin MydatAbseName</p>
  
  <p>This script above creates a database with the default database parameters.  However, I want to create a database with the following parameters, as follows:</p>
  
  <pre><code>   WITH OWNER = Myadmin 
     TEMPLATE = template0 
     ENCODING = 'SQL_ASCII'
     TABLESPACE = pg_default
     LC_COLLATE = 'C'
     LC_CTYPE = 'C'
     CONNECTION LIMIT = -1;
  </code></pre>
  
  <p>Please tell me how to create a database with the above parameters using Batch files.</p>
  
  <p>Also let me know how to use a .sql file to do the same, like this command-line:</p>
  
  <pre><code>"C:\Program Files\PostgreSQL\9.0\bin\createdb.exe" -U Myadmin -f C:\createDB.sql;
  </code></pre>