Re: specifying a password on the cmd line for db connect

From: Raymond O'Donnell <rod(at)iol(dot)ie>
To: "Gauthier, Dave" <dave(dot)gauthier(at)intel(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: specifying a password on the cmd line for db connect
Date: 2009-11-16 23:05:58
Message-ID: 4B01DAD6.4030105@iol.ie
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 16/11/2009 22:51, Gauthier, Dave wrote:
> Hi:
>
> Is there a way to require and specify a password at the cmd line for a connect? At first glance...
>
> --username foo --password fee
>
> would seem to be what I want. But it just prompts me for a password (after interpreting "fee" as the DB name).

Hi there,

There are no options such as these....what you do instead is use a
pgpass file:

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

Ray.

--
Raymond O'Donnell :: Galway :: Ireland
rod(at)iol(dot)ie

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Raymond O'Donnell 2009-11-16 23:12:01 Re: specifying a password on the cmd line for db connect
Previous Message Greg Smith 2009-11-16 23:04:51 Re: specifying a password on the cmd line for db connect