Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 3CFCA105A46B for ; Mon, 21 Nov 2011 03:55:07 -0400 (AST) Received: from sam.nabble.com ([216.139.236.26]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1RSOiX-0004dS-5i for pgsql-admin@postgresql.org; Mon, 21 Nov 2011 07:55:07 +0000 Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1RSOiI-0006fi-2p for pgsql-admin@postgresql.org; Sun, 20 Nov 2011 23:54:50 -0800 Date: Sun, 20 Nov 2011 23:54:50 -0800 (PST) From: PresleyDias To: pgsql-admin@postgresql.org Message-ID: <1321862090073-5009739.post@n5.nabble.com> Subject: Postgres database creation using batch files MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 201111/109 X-Sequence-Number: 38703 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; thanks in advanced:) -- View this message in context: http://postgresql.1045698.n5.nabble.com/Postgres-database-creation-using-batch-files-tp5009739p5009739.html Sent from the PostgreSQL - admin mailing list archive at Nabble.com.