pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Postgres database creation using batch files
3+ messages / 2 participants
[nested] [flat]

* Postgres database creation using batch files
@ 2011-11-21 07:54  PresleyDias <presley@umangsoftware.com>
  0 siblings, 1 reply; 3+ messages in thread

From: PresleyDias @ 2011-11-21 07:54 UTC (permalink / raw)
  To: pgsql-admin

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-tp5009739p50097...
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Postgres database creation using batch files
@ 2011-11-22 18:27  Thomas Kellerer <spam_eater@gmx.net>
  parent: PresleyDias <presley@umangsoftware.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Thomas Kellerer @ 2011-11-22 18:27 UTC (permalink / raw)
  To: 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-e...





^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Postgres database creation using batch files
@ 2011-11-23 04:28  PresleyDias <presley@umangsoftware.com>
  parent: Thomas Kellerer <spam_eater@gmx.net>
  0 siblings, 0 replies; 3+ messages in thread

From: PresleyDias @ 2011-11-23 04:28 UTC (permalink / raw)
  To: pgsql-admin

 

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
<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-tp5009739p50155...
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.

^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2011-11-23 04:28 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-11-21 07:54 Postgres database creation using batch files PresleyDias <presley@umangsoftware.com>
2011-11-22 18:27 ` Thomas Kellerer <spam_eater@gmx.net>
2011-11-23 04:28   ` PresleyDias <presley@umangsoftware.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox