From: PresleyDias <presley@umangsoftware.com>
To: pgsql-admin@postgresql.org
Subject: Re: Postgres database creation using batch files
Date: Tue, 22 Nov 2011 20:28:53 -0800 (PST)
Message-ID: <000901cca998$5885ab20$09910160$@com> (raw)
In-Reply-To: <jagpim$ikk$2@dough.gmane.org>
References: <1321862090073-5009739.post@n5.nabble.com>
<jagpim$ikk$2@dough.gmane.org>
Hello,
the solution just works fine for me using the batch file J
From: Thomas Kellerer [via PostgreSQL]
[mailto:ml-node+s1045698n5014311h58@n5.nabble.com]
Sent: Wednesday, November 23, 2011 12:01 AM
To: PresleyDias
Subject: Re: Postgres database creation using batch files
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-ba
tch-file-with-template-encoding-owner-an
--
Sent via pgsql-admin mailing list ([hidden email])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
_____
If you reply to this email, your message will be added to the discussion
below:
http://postgresql.1045698.n5.nabble.com/Postgres-database-creation-using-bat
ch-files-tp5009739p5014311.html
To unsubscribe from Postgres database creation using batch files, click
<http://postgresql.1045698.n5.nabble.com/template/NamlServlet.jtp?macro=unsu
bscribe_by_code&node=5009739&code=cHJlc2xleUB1bWFuZ3NvZnR3YXJlLmNvbXw1MDA5Nz
M5fDExODk2NzQ1MTI=> here.
<http://postgresql.1045698.n5.nabble.com/template/NamlServlet.jtp?macro=macr
o_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.B
asicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.templ
ate.InstantMailNamespace&breadcrumbs=instant+emails%21nabble%3Aemail.naml-in
stant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
NAML
--
View this message in context: http://postgresql.1045698.n5.nabble.com/Postgres-database-creation-using-batch-files-tp5009739p50155...
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: <000901cca998$5885ab20$09910160$@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