Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id AA686785C56 for ; Wed, 23 Nov 2011 00:29:09 -0400 (AST) Received: from sam.nabble.com ([216.139.236.26]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1RT4SI-00064t-Ua for pgsql-admin@postgresql.org; Wed, 23 Nov 2011 04:29:08 +0000 Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1RT4S5-0001PB-AW for pgsql-admin@postgresql.org; Tue, 22 Nov 2011 20:28:53 -0800 Date: Tue, 22 Nov 2011 20:28:53 -0800 (PST) From: PresleyDias To: pgsql-admin@postgresql.org Message-ID: <000901cca998$5885ab20$09910160$@com> In-Reply-To: References: <1321862090073-5009739.post@n5.nabble.com> Subject: Re: Postgres database creation using batch files MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_20770_11311875.1322022533320" X-Archive-Number: 201111/115 X-Sequence-Number: 38709 ------=_Part_20770_11311875.1322022533320 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 here. 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. ------=_Part_20770_11311875.1322022533320 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit

 

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.
------=_Part_20770_11311875.1322022533320--