| From: | PresleyDias <presley(at)umangsoftware(dot)com> | 
|---|---|
| To: | pgsql-admin(at)postgresql(dot)org | 
| Subject: | Re: Postgres database creation using batch files | 
| Date: | 2011-11-23 04:28:53 | 
| Message-ID: | 000901cca998$5885ab20$09910160$@com | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-admin | 
Hello,
the solution just works fine for me using the batch file J
From: Thomas Kellerer [via PostgreSQL]
[mailto:ml-node+s1045698n5014311h58(at)n5(dot)nabble(dot)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-tp5009739p5015520.html
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Hery Fanomezantsoa | 2011-11-23 06:08:21 | A CallableStatement was excecuted with an invalid number of parameters | 
| Previous Message | Craig Ringer | 2011-11-23 00:23:28 | Re: silent installer |