Re: Create database without entering password at command line - Mailing list pgsql-general

From Chris
Subject Re: Create database without entering password at command line
Date
Msg-id 48322645.3080807@gmail.com
Whole thread Raw
In response to Create database without entering password at command line  ("Nathan Thatcher" <n8thatcher@gmail.com>)
List pgsql-general
Nathan Thatcher wrote:
> I am trying to automatically create a database right after installing
> postgres. I launch the silent install (Windows) from my own executable
> and once it is done I need to create a database, tables, etc. I am
> trying to find a way to do this without having to explicitly enter the
> password in at the command prompt. What is the best way to do this?

You could use a pgpass file:

http://www.postgresql.org/docs/current/static/libpq-pgpass.html

--
Postgresql & php tutorials
http://www.designmagick.com/

pgsql-general by date:

Previous
From: "Gregory Williamson"
Date:
Subject: Re: Vacuuming on heavily changed databases
Next
From: Chris
Date:
Subject: Re: psql: FATAL: Ident authentication failed for user "postgres"