From: Thomas Kellerer <spam_eater@gmx.net>
To: pgsql-admin@postgresql.org
Subject: Re: Postgres database creation using batch files
Date: Tue, 22 Nov 2011 19:27:36 +0100
Message-ID: <jagpim$ikk$2@dough.gmane.org> (raw)
In-Reply-To: <1321862090073-5009739.post@n5.nabble.com>
References: <1321862090073-5009739.post@n5.nabble.com>
PresleyDias wrote on 21.11.2011 08:54:
> 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;
>
What's wrong with the answer you got on Stackoverflow?
http://stackoverflow.com/questions/8208181/create-posgtres-database-using-batch-file-with-template-e...
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: spam_eater@gmx.net
Subject: Re: Postgres database creation using batch files
In-Reply-To: <jagpim$ikk$2@dough.gmane.org>
* 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