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

From Thomas Kellerer
Subject Re: Postgres database creation using batch files
Date
Msg-id jagpim$ikk$2@dough.gmane.org
Whole thread Raw
In response to Postgres database creation using batch files  (PresleyDias <presley@umangsoftware.com>)
Responses Re: Postgres database creation using batch files
List pgsql-admin
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


pgsql-admin by date:

Previous
From: "Skusa, Andre"
Date:
Subject: silent installer
Next
From: Craig Ringer
Date:
Subject: Re: silent installer