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

From PresleyDias
Subject Re: Postgres database creation using batch files
Date
Msg-id 000901cca998$5885ab20$09910160$@com
Whole thread Raw
In response to Re: Postgres database creation using batch files  (Thomas Kellerer <spam_eater@gmx.net>)
List pgsql-admin

 

Hello,
the solution just works fine for me using the batch file
J

 

 

From: Thomas Kellerer [via PostgreSQL] [mailto:[hidden email]]
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-batch-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-batch-files-tp5009739p5014311.html

To unsubscribe from Postgres database creation using batch files, click here.
NAML



View this message in context: RE: Postgres database creation using batch files
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.

pgsql-admin by date:

Previous
From: Craig Ringer
Date:
Subject: Re: silent installer
Next
From: Hery Fanomezantsoa
Date:
Subject: A CallableStatement was excecuted with an invalid number of parameters