Postgres database creation using batch files - Mailing list pgsql-admin

From PresleyDias
Subject Postgres database creation using batch files
Date
Msg-id 1321862090073-5009739.post@n5.nabble.com
Whole thread Raw
Responses Re: Postgres database creation using batch files
List pgsql-admin
i want to create a postgres database using batch file, now the normal way of
doing this is

"C:\Program Files\PostgreSQL\9.0\bin\createdb.exe" -U Myadmin MydatAbseName

this create a database with the default database parameters, but i want to
create a database with the following parameter

   WITH OWNER = Myadmin
   TEMPLATE = template0
   ENCODING = 'SQL_ASCII'
   TABLESPACE = pg_default
   LC_COLLATE = 'C'
   LC_CTYPE = 'C'
   CONNECTION LIMIT = -1;

Please tell me how to create a database with the above parameter using Batch
files.

also how to use a .sql file to do the same, like this "C:\Program
Files\PostgreSQL\9.0\bin\createdb.exe" -U Myadmin -f C:\createDB.sql;

thanks in advanced:)


--
View this message in context:
http://postgresql.1045698.n5.nabble.com/Postgres-database-creation-using-batch-files-tp5009739p5009739.html
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.

pgsql-admin by date:

Previous
From: Rob Cherry
Date:
Subject: Question on implementing ident auth correctly.
Next
From: Jean-Armel Luce
Date:
Subject: Re: rsync and streaming replication