> Was wondering if there are ways to completely script a new postgresql installation. 
> I need to be able to create the db, users, and db elements from one command so that 
> I can included it in a setup routine.

That's rather easy.

A shell script can do roughly the following:

- initdb somewhere
- start PG
- run 'psql template1 < myload.sql'

The myload.sql would connect to template1,  do a "createdb newdbname" and 
start creating tables,  etc.

Almost the same concept as doing a restore from a pg_dumpall.

- Brandon

----------------------------------------------------------------------------
 c: 917-697-8665                                            h: 201-435-6226
 b. palmer,  [EMAIL PROTECTED]           pgp:crimelabs.net/bpalmer.pgp5

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
      joining column's datatypes do not match

Reply via email to