From: PresleyDias <presley@umangsoftware.com>
To: pgsql-admin@postgresql.org
Subject: Postgres database creation using batch files
Date: Sun, 20 Nov 2011 23:54:50 -0800 (PST)
Message-ID: <1321862090073-5009739.post@n5.nabble.com> (raw)
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-tp5009739p50097...
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: presley@umangsoftware.com
Subject: Re: Postgres database creation using batch files
In-Reply-To: <1321862090073-5009739.post@n5.nabble.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox