Re: Create database without entering password at command line

From: Chris <dmagick(at)gmail(dot)com>
To: Nathan Thatcher <n8thatcher(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Create database without entering password at command line
Date: 2008-05-20 01:15:49
Message-ID: 48322645.3080807@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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/

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Chris 2008-05-20 01:22:28 Re: psql: FATAL: Ident authentication failed for user "postgres"
Previous Message Gregory Williamson 2008-05-20 00:57:58 Re: Vacuuming on heavily changed databases